37 lines
905 B
TypeScript
37 lines
905 B
TypeScript
export type BlenderOperatorPropertyType = "boolean" | "number" | "enum" | "string";
|
|
|
|
export type BlenderOperatorPropertyValue = string | number | boolean;
|
|
|
|
export interface BlenderOperatorEnumItem {
|
|
value: string;
|
|
label: string;
|
|
}
|
|
|
|
export interface BlenderOperatorPropertySpec {
|
|
name: string;
|
|
type: BlenderOperatorPropertyType;
|
|
required: boolean;
|
|
label?: string;
|
|
description?: string;
|
|
defaultValue?: BlenderOperatorPropertyValue;
|
|
min?: number;
|
|
max?: number;
|
|
enumItems?: BlenderOperatorEnumItem[];
|
|
}
|
|
|
|
export interface BlenderOperatorDescriptor {
|
|
id: string;
|
|
label: string;
|
|
description?: string;
|
|
family: string;
|
|
context: "scene" | "object" | "main";
|
|
backgroundSafe: true;
|
|
properties: BlenderOperatorPropertySpec[];
|
|
}
|
|
|
|
export interface BlenderOperatorInvocation {
|
|
operator: string;
|
|
properties?: Record<string, BlenderOperatorPropertyValue>;
|
|
baseRevision?: number;
|
|
}
|