Is there any way to store last modified translate parm value
1033 2 1- 
                               
                                
                                
 - GreenPitaya
 - Member
 - 43 posts
 - Joined: April 2020
 - Offline
 
- 
                               
                                
                                
                                
                            
                         - vikus
 - Member
 - 247 posts
 - Joined: May 2017
 - Offline
 
                        Unfortunately there are no OnReleas, OnPress parameter events to store the last parm value. But you can compare time delta(cached/current time) with a tolarance value, which is not perfect but gives you a similar effect.
In the hip / embedded hda / scripts / python module you will find a constant MAX_TIME_DELTA, which is the tolarance value in milliseconds. Currently it is set to 300, you can play with it to find a sweet spot that might work for you.

If you more up to get distance while moving something in the viewport you can impliment hou.ViewerDragger [www.sidefx.com]. See drag_delta.hip example.
					
                    
                        
                            
                        
                    
					
						
					
                    
                    
                In the hip / embedded hda / scripts / python module you will find a constant MAX_TIME_DELTA, which is the tolarance value in milliseconds. Currently it is set to 300, you can play with it to find a sweet spot that might work for you.
If you more up to get distance while moving something in the viewport you can impliment hou.ViewerDragger [www.sidefx.com]. See drag_delta.hip example.
 Image Not Found
 Image Not Found
                    - 
                               
                                
                                
 - GreenPitaya
 - Member
 - 43 posts
 - Joined: April 2020
 - Offline
 
vikusThank you very much!
Unfortunately there are no OnReleas, OnPress parameter events to store the last parm value. But you can compare time delta(cached/current time) with a tolarance value, which is not perfect but gives you a similar effect.
In the hip / embedded hda / scripts / python module you will find a constant MAX_TIME_DELTA, which is the tolarance value in milliseconds. Currently it is set to 300, you can play with it to find a sweet spot that might work for you.Image Not Found
If you more up to get distance while moving something in the viewport you can impliment hou.ViewerDragger [www.sidefx.com]. See drag_delta.hip example.Image Not FoundImage Not Found
I'll try it!
- 
                    
- Quick Links
 
 
            
            
