OSArch Community

Duplicating failed for Array items after Apply Array

  1. A

    I'm trying to duplicate items that have been created by Array. If I try to duplicate the elements (Shift+D) after I'hv applied the Array Modifier, the duplication fails and I get an error message.

    `Python: Traceback (most recent call last):

    File "/home/arun/.var/app/org.blender.Blender/config/blender/4.0/scripts/addons/blenderbim/bim/module/geometry/operator.py", line 722, in execute

    return OverrideDuplicateMove.execute_duplicate_operator(self, context, linked=False)

    File "/home/arun/.var/app/org.blender.Blender/config/blender/4.0/scripts/addons/blenderbim/bim/module/geometry/operator.py", line 731, in execute_duplicate_operator

    IfcStore.execute_ifc_operator(self, context)

    File "/home/arun/.var/app/org.blender.Blender/config/blender/4.0/scripts/addons/blenderbim/bim/ifc.py", line 336, in execute_ifc_operator

    result = getattr(operator, "_execute")(context)

    File "/home/arun/.var/app/org.blender.Blender/config/blender/4.0/scripts/addons/blenderbim/bim/module/geometry/operator.py", line 725, in _execute

    return OverrideDuplicateMove.execute_ifc_duplicate_operator(self, context)

    File "/home/arun/.var/app/org.blender.Blender/config/blender/4.0/scripts/addons/blenderbim/bim/module/geometry/operator.py", line 756, in execute_ifc_duplicate_operator

    arrays_to_duplicate, array_children = OverrideDuplicateMove.process_arrays(self, context)

    File "/home/arun/.var/app/org.blender.Blender/config/blender/4.0/scripts/addons/blenderbim/bim/module/geometry/operator.py", line 849, in process_arrays

    for modifier_data in tool.Blender.Modifier.Array.get_modifiers_data(array_parent):

    File "/home/arun/.var/app/org.blender.Blender/config/blender/4.0/scripts/addons/blenderbim/tool/blender.py", line 620, in get_modifiers_data

    for modifier_data in json.loads(array_pset["Data"]):

    TypeError: 'NoneType' object is not subscriptable

    `

  2. B

    I think this is a bug. From my test, the "Apply Array" operator is not removing the "BBIM_Array" pset from the children, only from the parent.

    One way to fix this now would be to manually remove the "BBIM_Array" pset from the objects before trying to duplicate

  3. A

    Hello! Fixed issue, you can test it with the latest build.

  4. C

    Slightly offtopic, I think this is one of the most useful features of BlenderBIM compared to similar propriarity BIM software.

    I really would like to know where the code lives on Github and if there is any documentation.?

    I would like to understand how it works but whenever I go to the ifcopenshell repo I am completely overwhelmed by the amount of folders and files and get lost.

  5. T

    I study past commits too--especially for new features--as they'll show patterns like which folders/properties/operators are usually required and how they're interrelated. I'm still a big time novice, but i get a sense the fog is lifting, a little. ;)

  6. B

    @Coen Whenever I want to understand part of BBIM code, my approach is to use my code editor and do a global search for terms I think are related. In this case, I would search for "array", "ifc_array", "create_array", etc. Then I start reading the code using navigation features like "go to definition" and "go to references".

    Most of the array functionality is in blenderbim\bim\module\model\array.py and in blenderbim\tool\model.py

Login or Register to reply.