Sun Mar 05, 2017 12:06 pm
Sun Mar 05, 2017 5:24 pm
Salamandre wrote:@Ofnuts
No I prefer to modify my script to make it work with yours as such.
Salamandre wrote:I think duplicating scripts or "stealing" codes is counter productive.
Salamandre wrote:However, a procedure that creates objects (in your case vectors) should either destroy them before ending or return them as values.
Salamandre wrote:In the first part of my script, I tried to put a verification to see if the script text_along_path_full was there, and to inform the user if not.
- Code:
#if "python_fu_text_along_path_full" in dir(pdb):
# def_txt = ""
#else:
# def_txt = "you need the add-on text-along-path-0.4.py"
def_txt=""
But it doesn't work. Someone knows an other way to reach this goal ?
if 'python_fu_text_along_path_full' in set(dir(pdb)):
Tue Mar 07, 2017 11:35 pm
ofnuts wrote:Salamandre wrote:I think duplicating scripts or "stealing" codes is counter productive.
That's what you are doing anyway. As long as you distribute my code or a modified version of it, you will have to track any changes I make, whether it remains a separate script or the code is included in yours.
Ofnuts wrote:Salamandre wrote:However, a procedure that creates objects (in your case vectors) should either destroy them before ending or return them as values.
A procedure perhaps, but not a script, which is what we are talking about. This script can produce a variable number of paths, and there is no way to return them using the current API. Had I documented my script to be import'able, things would be different.
Ofnuts wrote:Try:
- Code:
if 'python_fu_text_along_path_full' in set(dir(pdb)):
Edit: strange... I could reproduce the problem, but now that I want to investigate this further, procname in dir(pdb) works as expected.
Fri Nov 18, 2022 1:04 am