View Full Version : Bevel Object From Plugin
wegnif
24th February 2010, 03:17 PM
I would like to bevel an object from inside a plugin, similar to the Surfaces->Bevel dialog, but I don't see any function to do this.
Any hints?
Thanks,
Bill
Andy
24th February 2010, 05:06 PM
start ac3d with -debug and watch the ouput when you execute a command from the menu. Then you can use the same command name in tcl_command("ac3d ....
wegnif
25th February 2010, 09:10 AM
Andy,
Thank you, this was an interesting feature of AC3D of which I was not aware.
For future reference, there are two 'prefs' variables which control bevelling, "prefs_bevel_indent" and "prefs_bevel_out". Before calling the Tcl command "surface_bevel", you should set those two variables using Tcl commands.
Is there any way to set variables using the C API? I tried both prefs_append_prefspec and ac_create_and_link_pref, and neither changed the current value of the variable, probably because it already exists.
Regards,
Bill
Andy
25th February 2010, 01:09 PM
tcl_command("set prefs_bevel_indent 1.0");
should work. There are probably other ways of updating the prefs but I can't check at the moment.
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.