shortcuts

User support for JPatch

shortcuts

Postby tee » Tue Jul 12, 2005 12:35 pm

nine,
i've written a small patch supporting custom shortcuts. you can download the patch here.
to install it download jpatch from cvs into eclipse and install the patch in /your_eclipse_working_directory/jpatch/src/ or by hand:
KeyMapAction.java goes to /jpatch/src/jpatch/boundary/action/
KeyMapDialog.java goes to /jpatch/src/jpatch/boundary/dialog/ and the rest to
/jpatch/src/jpatch/boundary/
i haven't tested the patch very well, but it should do the trick ;)

sascha,
i don't know if the code fits your needs, but maybe you'll have a look at it. i've marked all changes in the classes by //>>>>> test and //<<<<< test.
there seems to be a problem in JPatchKeyAdapter. i had to comment out the listKeys.indexOf(key) != -1 check because the removeKey(...) function called by removeKeyBindings() doesn't seem to remove the key from the list (eg. changing the SHIFT-A key to SHIFT-M will result in both keys accesssing the add_multiple_points item... :?:
Code: Select all
   public void addKey(JPatchKey key, Object object) {
      //if (listKeys.indexOf(key) != -1) throw new IllegalArgumentException(key + " already assigned");
      listKeys.add(key);
      listKeys.add(object);
   }
   public void removeKey(JPatchKey key) {
      loop:
      for (int i = 0, n = listKeys.size(); i < n; i += 2) {
           if (key.equals(listKeys.get(i))) {
            listKeys.remove(i);
            listKeys.remove(i);
            break loop;
         }
      }
   }
tee
 
Posts: 14
Joined: Mon Jun 27, 2005 8:59 am
Location: Vienna

Postby sascha » Tue Jul 12, 2005 2:13 pm

Ja sapperlot! :wink:

I've applied the patch and fixed the issue with duplicate key bindings.
It's now in the CVS...

This should do the trick for now. There are a number of issues with Key Shortcut (mostly related to keyboard focus), and the current sulution does not allow to assign keymappings to actions that currently don't have a shortcut.
So, at some point this whole key-shortcut stuff needs to be reworked, but that has no priority right now.

Thanks a lot for the patch!

Btw, as you've got an Nvidia card: If you have time, can you take a look at the problems with the OpenGL rendering too? You can start the new GL test from within Eclipse, the main class is jpatch.GlTest - looks like the teapot object was missing previously, so I've added it to the CVS... Maybe you can compare the GLCode with that from the Demos (e.g. the gears demo) and find out what's wrong. I have no problems on ATI cards :? All GL commands are in jpatch.boundary.Viewport2GL.java... Thanks!

PS: Let me know if you'd like to have CVS write access.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

Postby nine » Tue Jul 12, 2005 2:40 pm

So, at some point this whole key-shortcut stuff needs to be reworked, but that has no priority right now.


No, no - reworking the whole thing - can come later - just give us the chance to alter the shortcuts now avaible!
Z- that is Zoom and to set the Z-direction you use 1 or SHIFT+1
T for Turning the views so we do not have to use SHIFT+R
M Moving a view no SHIFT+M

Or if not a list - just alter them - you have to do it - sooner or later - believe me.

And hopefully giving us shortcuts for Detach, Zoom Fit, Align Patches and Flip Patches and a new buttons with shortcuts to see or not see the curves and patches..

Have I got that I content a while...
:D
nine
 
Posts: 133
Joined: Mon Jul 04, 2005 2:28 pm

Postby sascha » Tue Jul 12, 2005 3:12 pm

Well, it's already in the CVS. You can either checkout and compile it manually or use the Eclipse IDE and the instructions provided here.

I plan to re-activate the "nightly builds" (compiled once a day from the latest CVS snapshot) to make it easier to run the latest version, but it will take a few days.
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria

gldemo

Postby tee » Wed Jul 13, 2005 9:58 am

i tested the gldemo on the linux (where it already worked for me) and windows platform. there seems to be no problem with this demo on both platforms although i commented out the gl.Flush :?:

as i remember it was the linux platform dcuny had problems. i wonder whether it works for him also. maybe you changed some other part, could you send me the old gldemo? just for interest ;)

Code: Select all
   public void clear(int mode) {
      int bits = 0;
      if ((mode & COLOR_BUFFER) > 0) bits |= GL.GL_COLOR_BUFFER_BIT;
      if ((mode & DEPTH_BUFFER) > 0) bits |= GL.GL_DEPTH_BUFFER_BIT;
      gl.glClearColor(0,0,0,0);
      gl.glClearDepth(32000);
      gl.glClear(bits);
      //gl.glFlush();
   }
tee
 
Posts: 14
Joined: Mon Jun 27, 2005 8:59 am
Location: Vienna

Postby nine » Wed Jul 13, 2005 12:09 pm

The "nightly builds" there to find them?

And then will the download page be updated?:
http://sourceforge.net/project/showfile ... p_id=73389


Building it myself I believe I better have a WINK on it to do it...
It seems a bit much to me how to figure out all the requirements...
:D

JPatch developer documentation
Requirements

You’ll need at least a Java 2 Standard Edition (J2SE) Runtime Environment (JRE) version 1.4 or later. You can download it from Sun Microsystems free of charge. Note that the CVS version does no longer include the Apache Xerces2 XML parser, since this package is quite large and is included in Java 5.0 (JRE versoin 1.5)! If you use an 1.4 JRE you must install and configure a SAX compatible XML parser for JPatch to run.
nine
 
Posts: 133
Joined: Mon Jul 04, 2005 2:28 pm

Re: shortcuts

Postby nine » Fri Jul 15, 2005 11:53 am

tee wrote:nine,
i've written a small patch supporting custom shortcuts. you can download the patch here.
to install it download jpatch from cvs into eclipse and install the patch in /your_eclipse_working_directory/jpatch/src/ or by hand:


Thank you again for letting me use my own shortcuts...
And perhaps there are others also wanting to do the same thing.
But using Eclipse and your patch is perhaps easy for the ones knowing how to do it... but it will take me to much time doing it... understanding how to fix it... so I wonder this will oppurtunity be in the new build of JPatch I can download from Sourceforge some day?
And when?
And if so - how can I insert my own shortcuts? is there a menu?
Hope on a reply - so I can understand this... or perhaps I have misunderstood it????
:D
nine
 
Posts: 133
Joined: Mon Jul 04, 2005 2:28 pm

Need a assign shorcut please

Postby dphamhi » Tue Apr 11, 2006 3:11 pm

I will second Nine in his asking for a way to assign user shortcuts.

Especially with Jpatch assigning newly created patches 50% with normals pointing outward, 50% inward :?

Thank you very much !
~ dphamhi ~
dphamhi
 
Posts: 21
Joined: Mon Aug 23, 2004 8:40 am
Location: Paris

Postby sascha » Tue Apr 11, 2006 7:51 pm

User definable keyboard shortcuts will most likely be supported in the next version.

As for the patches pointing in the wrong direction: Select everything and use "align patches" from the popup menu - this should correct the alignment in most cases. We'll also work on an improved patchfinder that finds patches during editing and automatically tries to align them properly...
sascha
Site Admin
 
Posts: 2792
Joined: Thu May 20, 2004 9:16 am
Location: Austria


Return to Support / Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron