Skip to content

Trouble Using Geometry-Script Functions: Documentation Examples and mesh_boolean Issues in Latest Blender Version #62

@pterusgithub

Description

@pterusgithub

I feel a bit lost trying to work with certain geometry-script functions, and the examples in the documentation don’t seem to work with the latest versions of Blender. At first, I thought the issues might be due to an outdated installation of the add-on, so I reinstalled it. However, I’m still encountering the same errors.

Here are two examples of issues:

  1. The first relates to the use of mesh_boolean. Below is the corresponding code and the resulting error.
import geometry-script as gs

def shape_func():
    cube_01 = gs.cube(size=(1,2,1)).mesh
    cube_02 = gs.cube(size=(2,1,3)).mesh
    # 'INTERSECT', 'UNION', 'DIFFERENCE'
    shape_union = gs.mesh_boolean(operation="UNION",solver="FLOAT",mesh_1=cube_01,mesh_2=[cube_02]).mesh
    return shape_union
    Error: Python: Traceback (most recent call last):
    File "/2024-11-22_geo_script-005.py", line 165, in <module>
    File "/pathto/.config/blender/4.3/scripts/addons/geometry-script-main/api/tree.py", line 136, in build_tree
    outputs = builder(**builder_inputs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/2024-11-22_geo_script-005.py", line 170, in shape_func
    AttributeError: 'Type' object has no attribute 'mesh'
  1. Although the code runs without errors, the connections formed are incorrect (see the attached image).
def shape_func():
    cube_01 = gs.cube(size=(1,2,1)).mesh
    capture = gs.capture_attribute(gs.position())
    return cube_01

Pasted image 20241122095306

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions