Getting Pivot point value for Paint in Python

Hi there!

Is there a syntax where I can call or set the coordinate value of the Pivot point of the clone tool?

You can press the . key to toggle the anchor on/off.

@EugeneMatthew I would love a way to reset the clone tool to same frame and reset coordinates. Also is there a quick way to find out what hotkeys/shortcuts are assigned to what in Silhouette? I know I can see them in the keybinds.py but wasn’t sure if there was a list anywhere. Just curious.

Thanks @paul.miller for the reply and I am aware of the . key. Im looking for the syntax because I would like to have a hotkey to reset the clone tool coordinates like the “Reset” button but assigned to a hotkey.

Hey @Katie, that was what I was intending to do. To reset the clone tool to the current frame and reset coordinate as seperate hotkeys.

@Katie The default list of keyboard shortcuts can be found in the user guide in the Keyboard Shortcuts section.

@Marco I was thinking of just a list of all of them, but yeah, the Keyboard Shortcuts in the User Guide seems to the best resource as it lists them in terms of tools and features. Love the User Guide, thank you!

I could make an alphabetical list of shortcuts if that would be helpful. Let me know.

2 Likes

@EugeneMatthew
Thats the Hotkeys, I would love to see! SO much ease to paint boring -long range paint tasks, If we have that. Thankyou!

@Marco I think the User Guide might suffice, but if there was a way that a user could cross reference Keyboard Shortcuts that would be helpful since there are some keys and keys/modifiers that are used in duplication depending on what type of task one is performing in Silhouette. And it would depend on if a user wanted to change something globally or within a certain toolset or mode/node. I try to made modifications that pertain to a certain mode I am in, but I do have a few global ones and have to be careful with those.

1 Like

Ah, sorry about that. One easy thing you could do is create a Paint preset into one of the 10 slots, and then just hit Alt+[slot#] to set those parameter values.

If you want to bind a different key to just changing those parameters, this set of scripting will do it:

from fx import *

beginUndo("Reset Clone")
paint.setState("Clone.position:0", Point3D(0, 0))
paint.setState("Clone.frame:0", 0)
endUndo()
2 Likes

I’ve been working on a design for adding a GUI to the keybind mechanism where you can easily bind keys to a pre-defined set of of built-in operations but also provide your own little python snippets as well, with the ability to override based on context (ie tool, node, etc), thus removing the need to edit the keybinds.py file manually. Not sure when I’ll be able to work it in though.

2 Likes

Having a GUI for pre-defined of built-in operations would definitely be really helpful. A lot of my colleagues are asking me to help them create their own user preferred keybinds, which i have to create in the .silhouette folder in their home directory.

Thanks Paul for the script! Yes i have set the alt+[slot#] for my team. Really improve the productivity. I also added the save state of the current index before changing to another preset because i noticed that the position of the clone source, opacity and size goes back to it’s last saved state which doesn’t flow well with our workflow.

Is there a documentation on what arguments i can call or set for the Clone or paint tool? There are other tools the team here are requesting like a Color Palette where we can save sourced colors from the color picker in the Paint tool and stuff like that.

Ah hey Eugene - sorry I somehow missed this!

You can find the names of the paint state keys by hovering over a “Paint State” event in the history. You’ll see things like “softness”, “Clone.position:0”, etc. You can use those names for getting/setting paint state.

1 Like

Hey Paul,

No worries! Thank you!