Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Pivot, Wait() and GUI Functions  (Read 8780 times)

Francesco

  • Full Member
  • ***
  • Posts: 182
    • View Profile
Pivot, Wait() and GUI Functions
« on: November 10, 2008, 08:50:50 am »

Hi all,
I've got a couple of suggestions about extending ASL features.

- Access / modify pivot's location and orientation;
I mentioned it elsewhere, the pivot is a very important reference point, way more evident than meshes' origins. By the way, it would be good to show meshes' origins in some viewmode (maybe just in pivot-edit mode while on wireframe view).

- Access to standard GUI functions;
(such as MergeFaces() and SubdivideFaces(), for instance, applied to selected items each time).

I'm asking for a specific reason: the polimagnet script used in "all directions" mode ends up enlarging faces. I'm going to code in that if a face gets too large, then it gets automatically subdivided, in order to add detail and volume. If I were allowed to call ConnectEdges(), tasks like this would become childplay.

Although I ask this for personal interest, I think that the access to those functions would be really useful for all ASL coders.

- Some kind of wait or delay function;
I mean giving back CPU ticks, not occupying them in a busy loop. The aim is to be able to put scripts in idle mode.

An example: the mirror script doesn't really need to duplicate the mesh all the times. Assuming also that Anim8or flags a mesh as "modified" after an user's action, the mirror script could handle it this way:
while($originalmesh.modified == false) {
    wait($idletime);
}
$originalmesh.modified = false;
In a script like the polimagnet, checking if the meshes have been rotated or displaced would be enough for calling the wait() function. The "modified" flag is not truly necessary, but would be really useful anyway.

Have good time people.
« Last Edit: November 10, 2008, 08:57:36 am by Francesco »
Logged