WIP on a script for triangles

i began copying a script class from a nemeu for addmesh like the pipe script to a nomral tool pro panel and it gives errors on some of the commands

can someone help to debug this and make it works again

mind you the algo in this script does not work yet i’m still debugging it!

see included file here

thanks for any help


inwardtriangpanel3.blend (339 KB)

At first glance, i’m getting a runtime error when the add circle is being called, saying it can’t do that here in that context. That’s probably because the draw function gets called numerous times as it’s refreshed etc, so you need to function that section of ‘doing’ code off into an operation which gets called.

ok for the circles i can find another way to add a new object which is longer to write but should work ok

now remove these 2 circles primitives and execute it again i get an error on the mesh creation also
like it does like the new object !

and this is working in another script with add menu but may be in this context something has to be change but what !

i made one where i use an operator to do it but it does not change the mesh data when i change the buttons properties i need to click on the operator to make it work!

would be faster if it can work inside the execute of the class panel if possible !

i 'm trying to debug this algo and it’s a complicated model to calculate !
so that’s why i’d like thsi script to work and help me debug this algo!


TBH i’ve never done a tool property before (been intending too), however i’m wondering if you need a selected object (whether that’s just been made or just simply selected), and then say in edit mode you could delete / create the data within the object.

AFAIK the tool properties is for the currently selected object context.

so it cannot work to create an object in panel execute !

and i have to modify and sue an operator to do it ?

happy 2.5

one thing with the add mesn sript
when you change a button it wil replace all the objects

but when you do it inside an operator with same codes it is creating adding new objects each time

it’s almost like i need to add a remove all mesh objects also!

happy 2.5