KillJob by name?

KillJob by name?

dg3duy
Collaborator Collaborator
262 Views
2 Replies
Message 1 of 3

KillJob by name?

dg3duy
Collaborator
Collaborator



 

global proc setAutoFrame()
	{
toggleAutoLoad graphEditor1OutlineEd 0;
int $fit = `optionVar -q graphEditorAutoFit`;
if ($fit==0){
    optionVar -intValue graphEditorAutoFit 1;
        
	}
{ 
         
if ($fit==0){
    optionVar -intValue graphEditorAutoFit 1;
	}
	doReload graphEditor1OutlineEd;
    toggleAutoLoad graphEditor1OutlineEd 0;
}	
	
	}
scriptJob -event graphEditorChanged setAutoFrame;
//scriptJob -ka -f;

 

How to kill the scriptjob by name and not everyone who may be active in the scene.?
With the help of @Kahylan  I am using autofit in the graph editor automatically every time the curves are moved, but if I want to stop using the scriptjob I don't know how to stop it without killing everyone with this command. 

 

scriptJob -ka -f;

 

0 Likes
Accepted solutions (1)
263 Views
2 Replies
Replies (2)
Message 2 of 3

mcw0
Advisor
Advisor
Accepted solution

Record the scriptJob id.

 

int $jobId = 'scriptJob -e graphEditorChanged setAutoFrame`;

 

scriptJob -kill $jobId;

Message 3 of 3

dg3duy
Collaborator
Collaborator

Thank you very much, I learn every day with the valuable information you provide. @mcw0 

0 Likes