Hello. I need to make a native extension using Clojure. For the extension I need to make I will need to add a key shortcut to the editor or at least just add a new entry in the Outline context menu. Nevertheless, before I do that I need to at least have a working minimal template for Clojure that can just load in editor and do nothing as starting point.
There are very few native extensions that use Clojure at all and all of them during their initialization register asset types, but in my case I won’t have to register asset types or do anything at the time plugin initializes. So I tried and came up with this code:
(ns editor.pasteextended
(:require [clojure.java.io :as io]
[clojure.string :as string]
[dynamo.graph :as g]
[editor.app-view :as app-view]
[editor.build-target :as bt]
[editor.colors :as colors]
[editor.defold-project :as project]
[editor.dialogs :as dialogs]
[editor.geom :as geom]
[editor.gl :as gl]
[editor.gl.pass :as pass]
[editor.gl.shader :as shader]
[editor.gl.texture :as texture]
[editor.gl.vertex2 :as vtx]
[editor.graph-util :as gu]
[editor.handler :as handler]
[editor.outline :as outline]
[editor.pipeline :as pipeline]
[editor.pipeline.tex-gen :as tex-gen]
[editor.properties :as properties]
[editor.protobuf :as protobuf]
[editor.render :as render]
[editor.resource :as resource]
[editor.resource-node :as resource-node]
[editor.scene-picking :as scene-picking]
[editor.texture-set :as texture-set]
[editor.types :as types]
[editor.util :as util]
[editor.validation :as validation]
[editor.workspace :as workspace]
[internal.java :as java]
[schema.core :as s]
[util.coll :refer [pair]]
[util.digestable :as digestable])
(:import [com.dynamo.gamesys.proto Gui$NodeDesc$ClippingMode]
[editor.gl.texture TextureLifecycle]
[javax.vecmath Matrix4d Point3d]))
(set! *warn-on-reflection* true)
; The plugin
(defn- load-plugin-pasteext [workspace]
())
(defn- return-plugin []
(fn [x] (load-plugin-pasteext x)))
(return-plugin)
When I try to load the editor I’m getting the following error:
What could I be missing? Thanks for help in advance.
Target Defold version: 1.6.4