Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

Open
pterusgithub opened this issue Nov 22, 2024 · 0 comments

Comments

@pterusgithub
Copy link

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant