NevilArt / BsMax

BsMax Blender Addon (UI simulator/ Modeling/ Rigg & Animation/ Render Tools and ...
GNU General Public License v3.0
212 stars 25 forks source link

Create Primitve Not working in Edit Mode #40

Closed A16D closed 4 months ago

A16D commented 6 months ago

The shortcut "Shift+Ctrl+A" works for Object Mode as it is available in Keymap section but not available for Edit Mode, thus gives Error - _Menu_BsMax_MTCreate Not Found and When using the create primitve from Blender Defaults Add menu in Edit mode gives the Traceback Error _

Python: Traceback (most recent call last):
  File "BsMax\tools\internal\object\create.py", line 223, in execute
    add_parametric_primitive(self.type, ctx)
  File "BsMax\tools\internal\object\create.py", line 78, in add_parametric_primitive
    obj.create(ctx)
  File "BsMax\primitive\box.py", line 411, in create
    self.create_mesh(ctx, mesh, self.classname)
  File "BsMax\primitive\primitive.py", line 325, in create_mesh
    primitive_geometry_class_create_mesh(self, ctx, meshdata, classname)
  File "BsMax\primitive\primitive.py", line 62, in primitive_geometry_class_create_mesh
    set_as_active_object(ctx, self.owner)
  File "BsMax\bsmax\actions.py", line 88, in set_as_active_object
    bpy.ops.object.select_all(action='DESELECT')
  File "Blender Foundation\Blender 4.0\4.0\scripts\modules\bpy\ops.py", line 109, in __call__
    ret = _op_call(self.idname_py(), kw)
RuntimeError: Operator bpy.ops.object.select_all.poll() failed, context is incorrect

Note - Same for Curve Edit mode as well

A Suggestion for Create Primitve Menu - Snipaste_2024-03-06_13-32-59

Also what could be the usefulness of showing grid while creating primitive/object? Snipaste_2024-03-06_13-40-56 The visual grid I think should follow the Grid scale of the scene if its purpose is for precise placement and snapping Just for Reference 😉

NevilArt commented 6 months ago

Hi

Thank you for reporting the issue and suggestions.

  1. BsMax Create Object works only on object mode and you can not create a parametric primitive in edit mode.
  2. For Draw mode I already tried to add row button on menu but my tires was not successful but I'll try to fine a solution.
  3. Draw primitive system gonna be rewrite completely and I could replace virtual grid with new one.

New draw system gonna draw only I icon while drawing and after finish Object data will create once same as Blender draw primitive. This could make possible to create an new object in edit mode but without parameter. And my main goal is adding snapping tools too.