I have 2 objects, and I need to add one object to the other object.  var loc = {   leftArray: [],   topArray: [],   bottomArray: [],   rightArray: [] }  var obj = {   id: "ce",   icon: "logo/image.png",   name: "CE",   type: "type2",   version: 3.4 }   var obj = {   id: "ce",   icon: "logo/image.png",   name: "CE",   type: "type2",   version: 3.4,   leftArray: [],   topArray: [],   bottomArray: [],   rightArray: [] }   Is there any simple way to do this?
614
I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.
45310
Is there a built in function in .NET 2.0 that will take two arrays and merge them into one array?  The arrays are both of the same type. I'm getting these arrays from a widely used function within my code base and can't modify the function to return the data in a different format.  I'm looking to avoid writing my own function to accomplish this if possible.
38108
I need to create many pairs of edge loops on different objects. The way I do this is shown in the animation below.   There is a further step I often do which is moving the edge loop using its transform value in the properties panel, to ensure they are always same distance apart.  Is there an easier way to add the same number of edge loops again to the side of the original 3 loops?
112067
How to add material to selected objects via python? Material must be linked to Object (not Data).
2464
I'm creating side skirts for a truck and I am duplicating the frames I want. The problem is it's making the duplicated object into another object. How do I put it into the same one?
96847
I have a code sample that gets a SEL from the current object,   SEL callback = @selector(mymethod:parameter2);   And I have a method like    -(void)mymethod:(id)v1 parameter2;(NSString*)v2 { }   Now I need to move mymethod to another object, say myDelegate.  I have tried:  SEL callback = @selector(myDelegate, mymethod:parameter2);   but it won't compile.
77477
I am trying to dynamically create a data table with two arrays (SObject array and a String array which has field API name).  The two arrays are Contact[] and String[], where String[] consists of ["Id", "Name"].  What I've tried dot notation and square bracket notation but neither worked.  &lt;!-- row --&gt; &lt;aura:iteration item="{!v.contacts} var="contact"&gt;     &lt;!-- column --&gt;     &lt;aura:iteration item="{!v.fieldNames} var="fieldName"&gt;         {!contact.fieldName}          {!contact[fieldName]}     &lt;/aura:iteration&gt; &lt;/aura:iteration&gt;   Not quite sure what is the correct approach to do this.
45206
What is the difference between Object Literals and Array Literals in JavaScript? I know it has something to do with the length method but i don't fully understand it.
46461
I want to have a Cube in scene A, and linked in scene B, but with different material.  The solution for this problem was found on .     click the material tab and you will see a little drop down that says "dat" or "Data". Click that and change it to "Object". Now you can assign the material to the object instead of the mesh or "Data Block".   But what if I have 5000 Cubes in scene A, and I want 4999 of them to be in scene B with different material X, and 1, with material Y.  If I try to "link material" in scene B, with new material, it won't copy "Object" selection. I would have to go over 4999 cubes and change them to "object" in material tab.  I can't join them, and then separate - all objects are in a mess after that (and blender crashes anyway).  Material override for whole scene won't work for me.  Is there any option to override materials in groups? That would solve the problem in some way.
102085
I am trying to set up an operator to use the BoolTool after I set a position and modifier on Selected object and a different one on the Active object. I basically need to move the selected object up in Z and add a solidify modifier at .3 thickness, and to the Active I need to add a solidify at .1 thickness and remain in original position.  I thought I understood how to get this to work, but all I get is both modifiers on the Active object. Any hint as to where to go from here?  class SolidfyDifference(bpy.types.Operator): """Solidify and Difference Mask""" bl_idname = "object.solidfy_difference" bl_label = "Add Solidy and Difference Bool" bl_options = { 'REGISTER','UNDO' }  def execute(self, context):     scene = context.scene      sel = bpy.context.selected_objects     act = bpy.context.active_object        for obj in sel:         if obj != act:             bpy.ops.object.modifier_add(type='SOLIDIFY')             bpy.context.object.modifiers["Solidify"].thickness = 0.1        return {'FINISHED'}
22278
I have an object x. I'd like to copy it as object y, such that changes to y do not modify x. I realized that copying objects derived from built-in JavaScript objects will result in extra, unwanted properties. This isn't a problem, since I'm copying one of my own literal-constructed objects.  How do I correctly clone a JavaScript object?
90192
I have an object that I want to make a square array like a 3x3x3 cube. I want be able to change length and count for one axis and have all the other ones follow.
27442
I want an object to have the same Transforms (location, rotation, and scale) as another object. How can I copy the Transforms from one object to another?
14108
Basically, I'm trying to create an object of unique objects, a set. I had the brilliant idea of just using a JavaScript object with objects for the property names. Such as,  set[obj] = true;   This works, up to a point. It works great with string and numbers, but with other objects, they all seem to "hash" to the same value and access the same property. Is there some kind of way I can generate a unique hash value for an object? How do strings and numbers do it, can I override the same behavior?
32571
I am looking for a way to take all the faces of an object and make each face it's own object.   In the image above, you'll see a basic representation of what I'm trying to accomplish. On the left is a shape with faces, all attached. On the right is the result I want, an object for each face. The project I'm working on is much more complicated than this example, so I can't select each face and separate by selection. I have over 3,000 faces to work on.
912
What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.
23206
It's a bit difficult to implement a deep object copy function. What steps you take to ensure the original object and the cloned one share no reference?