Hotkeys

Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Hotkeys

Post by Talik » 19 Jul 2023, 22:59

I'm trying to bind my hotkeys for these operations. Do you know how these operations are called inside the keyboard mapping manager? https://www.dropbox.com/s/r8kgm5fp7vgnr ... 0.jpg?dl=0

I'm not a specialist in scripting. As I try to make a custom script to assign it to a hotkey I realise that this command that was recorded in scripting editor doesn't work. What should I do to make this commad work and assign it to a hotkey? https://www.dropbox.com/s/tyxc98jqym3t5 ... 1.jpg?dl=0
Last edited by Talik on 20 Jul 2023, 17:50, edited 1 time in total.

opoppopopp
Posts: 169
Joined: 16 Jun 2009, 06:23

Re: Hotkeys

Post by opoppopopp » 20 Jul 2023, 16:49

SetTransientReferencePlane( Selection(0) );

Select Object or edge,point,face and this simple command will do the SAME thing as "Pick X reference"

And "-" is the default shortcut :)

"View in Browser" in keyboard mapping editor will show you all available command

Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Re: Hotkeys

Post by Talik » 20 Jul 2023, 18:09

I'm using a custom keymay that is heavily modified using a 3ds max preset as the base.

"-" shortcut works but the differance is that 'Pick X referance" is faster and fewer clicks are needed to use it. That's why I want to assign these operations to a hotkey.

SetTransientReferencePlane( Selection(0) ); - this command doesn't work.

I would like to learn about scripting in XSI for making modeling tools. But I'm not familiar with scripting. Do you know videos or tutorials about scripting that will teach fast and precise?

opoppopopp
Posts: 169
Joined: 16 Jun 2009, 06:23

Re: Hotkeys

Post by opoppopopp » 21 Jul 2023, 18:08

First pick your object, or point,edge,face
And then press "-" will give the exact same result as you shown in your pic
https://www.dropbox.com/s/r8kgm5fp7vgnr ... 0.jpg?dl=0

They are same, and SetTransientReferencePlane( Selection(0) ); is also doing the same thing.

For little more about custom a script as command (can bind to a key)
Drag your script to self, select "Script command (external file)", name it, remember the "command name" you used, and you can now assign this command to a key.

for example:
var rtn = PickElement( "polygon");
SetTransientReferencePlane( rtn.Value("PickedElement") );
This is equal to "Pick Polygon Ref"

Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Re: Hotkeys

Post by Talik » 21 Jul 2023, 23:43

When using commands in the menu I showed they work different. End result is the same but less clicks are needed to use them. That's why I need these commands from the menu for modeling. They are faster
https://www.dropbox.com/s/ntj06fueu5e3z ... 2.gif?dl=0

I am not familiar with scripting at all. This is what happens
https://www.dropbox.com/scl/fi/bcu5mw1q ... 9efhl&dl=0

opoppopopp
Posts: 169
Joined: 16 Jun 2009, 06:23

Re: Hotkeys

Post by opoppopopp » 22 Jul 2023, 18:20

Talik wrote: 21 Jul 2023, 23:43 When using commands in the menu I showed they work different. End result is the same but less clicks are needed to use them. That's why I need these commands from the menu for modeling. They are faster
https://www.dropbox.com/s/ntj06fueu5e3z ... 2.gif?dl=0
Understand now.
That script will give you the same workflow as "pick polygon ref".
Just make it a custom command so that you can map it to a key

Or check the softimage document, it is very simple, just drag script to any shelf

Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Re: Hotkeys

Post by Talik » 22 Jul 2023, 22:24

Now I see. It's JScript.

I works good. I've added a line to select Referance mode before using it.
SetUserPref("3D_TRANSFO_REFERENTIAL_CHANGED", 3);
var rtn = PickElement( "polygon");
SetTransientReferencePlane( rtn.Value("PickedElement") );
For my specific needs I want a hotkey for these snapping options too
https://www.dropbox.com/scl/fi/nyxmuxbg ... 9hx43&dl=0
I've found two separate commands that turn on and off them. But I need them toggle on and off.
https://www.dropbox.com/scl/fi/8763t7u2 ... v7uiz&dl=0

It takes a lot of time to change the increments in XSI. THey are located in preferance setting. Can I write a script that will be faster and easier to use during the modeling?
https://www.dropbox.com/s/qvar013rduvtk ... 3.jpg?dl=0

I saw one guy had changed the original XSI files to make them better for his needs. I would change this line here. I use bevel a lot. How to do this?
https://www.dropbox.com/scl/fi/dsv3oaep ... 1wz0r&dl=0

opoppopopp
Posts: 169
Joined: 16 Jun 2009, 06:23

Re: Hotkeys

Post by opoppopopp » 23 Jul 2023, 20:36

Talik wrote: 22 Jul 2023, 22:24 I works good. I've added a line to select Referance mode before using it.
Great so now you already know how to scripting.

XSI got you all covered:
ToggleValue("Enable0D", "preferences.SnapProperties")
This command is there, since XSI 1.0, it toggle boolean value.

For setting preference
SetValue("preferences.TransformProperties.translatesnap", X, null);
Same as that pick command, just make it a custom command, and bind it to a key.

BTW.
Guess you will have a lot custom script from now on,
suggest you check xPop or other custom quick menu plugs in this site,
it will make your workflow even quicker.

Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Re: Hotkeys

Post by Talik » 23 Jul 2023, 20:56

opoppopopp wrote: 23 Jul 2023, 20:36 Great so now you already know how to scripting.
I would like to but I don't know commands.

opoppopopp
Posts: 169
Joined: 16 Jun 2009, 06:23

Re: Hotkeys

Post by opoppopopp » 23 Jul 2023, 22:02

Talik wrote: 22 Jul 2023, 22:24 I works good. I've added a line to select Referance mode before using it.
No, you already modify others script :ymsmug:
Not kidding, basically start form modifying the logged commands in Script Editor, already got a lot of your need covered.
And ToggleValue() solve you another problem, right.

Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Re: Hotkeys

Post by Talik » 23 Jul 2023, 22:07

opoppopopp wrote: 23 Jul 2023, 22:02 Not kidding, basically start form modifying the logged commands in Script Editor, already got a lot of your need covered.
I did a lot of simple scripts for myself but I don't know scripting commands. Where to find them? I feel like there is a lack of educational resources about XSI.

What is xPop? I've watched a video about installation. Is it for making new pop menus for scripting inside Softimage? Or as said in a video it can take tools from other softwares and put them into XSI?
SetValue("preferences.TransformProperties.translatesnap", X, null);
Is it possible to make menu for this where can choose the angle?

opoppopopp
Posts: 169
Joined: 16 Jun 2009, 06:23

Re: Hotkeys

Post by opoppopopp » 24 Jul 2023, 17:53

For all commands, why not check the SI manual? it has a whole section cover ALL commands, A-Z

For XPop search resource section of this site. resources.php, it has VERY detailed explanation .

And basically it solve your third question, you can make all your custom commands accessible very quickly as pop up menu, like make several commands to quickly set your angle to X, etc.
Talik wrote: 23 Jul 2023, 22:07 Is it possible to make menu for this where can choose the angle?

Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Re: Hotkeys

Post by Talik » 24 Jul 2023, 23:48

There is neither a chapter about scripting in Softimage user guide nor a topic that covers all scripting commands

opoppopopp
Posts: 169
Joined: 16 Jun 2009, 06:23

Re: Hotkeys

Post by opoppopopp » 26 Jul 2023, 18:00

Talik wrote: 24 Jul 2023, 23:48 There is neither a chapter about scripting in Softimage user guide nor a topic that covers all scripting commands
Softimage SDK HELP, listing all default factory commands, I am sure.

Talik
Posts: 56
Joined: 09 May 2017, 11:13
Skype: nihao00042

Re: Hotkeys

Post by Talik » 14 Sep 2023, 21:49

How to remove a command from the Keyboard mapping menu?
Here I did custom scripts. I modified a script and rewrote it and now I'm having two commands. One of them doesn't work. These commads exist in Keymap Mapping menu even if the script is been removed.
On the bottom the Data/Scripts folder
Image

User avatar
FXDude
Posts: 1129
Joined: 19 Jun 2012, 21:59

Re: Hotkeys

Post by FXDude » 17 Sep 2023, 21:19

Talik wrote: 14 Sep 2023, 21:49 How to remove a command from the Keyboard mapping menu?
In any toolbar section --> RightClick --> Customize Toolbar


From there you can manage/delete custom registered scripts :

Image

Post Reply

Who is online

Users browsing this forum: No registered users and 42 guests