Function to remove a quick control assignment from the specified layer and quick control. For example, Available in: Controller.
Description
this.parent
defines the parent layer of the script module as the layer that contains the quick control. The qc
argument is the index of the quick control with the assignment to be removed. The assignment
argument is the index of the quick control assignment to be removed. The indices of the quick controls and the assignments both start counting from 1.Arguments
qc The index of the quick control with the assignment to be removed. number assignment The index of the quick control assignment to be removed. number Example
-- remove all quick control assignments from the specified layer and qc
function clearQC(layer, qc)
local assignments = layer:getNumQCAssignments(qc)
if assignments > 0 then
for i = assignments, 1, -1 do
layer:removeQCAssignment(qc, i)
end
print(assignments.." assignments have been removed from '"..layer.name.."', QC "..qc..".")
else
print("No assignments found on '"..layer.name.."', QC "..qc..".")
end
end
clearQC(this.parent, 1)
See Also: addQCAssignment, getNumQCAssignments, getQCAssignmentParamId, getQCAssignmentScope, getQCAssignmentMin, getQCAssignmentMax, getQCAssignmentCurve, getQCAssignmentType, getQCAssignmentBypass, setQCAssignmentParamId, setQCAssignmentScope, setQCAssignmentMin, setQCAssignmentMax, setQCAssignmentCurve
1 Comment
Sabine Pfeifer
proofread done