Lua Scriptable Spark Editor
Anthoni
Join Date: 2009-04-10 Member: 67129Members
It would be nice if we could script plug-ins for the spark editor in Lua. :)
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->-- Make a Brush Plane
local PLUGIN = {}
PLUGIN.Name = "Make Plane"
PLUGIN.Description = "Makes a Brush Plane"
PLUGIN.Author = "Anthoni"
function PLUGIN:makePlane( pointA, pointB )
local brush = spark.newBrush()
brush.AddVertex( pointA.x , pointA.y , pointA.z )
brush.AddVertex( pointA.x , pointB.y , pointA.z )
brush.AddVertex( pointB.x , pointA.y , pointB.z )
brush.AddVertex( pointB.x , pointB.y , pointB.z )
end
spark.RegisterPlugin( PLUGIN )<!--c2--></div><!--ec2-->
I don't know something like that. Possibly a way to create a custom UI for each plugin.
<b> Other Suggestions for Spark </b>
-A scriptable Shelf like Maya.
-A command line interface at the bottom for running scripted commands.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->-- Make a Brush Plane
local PLUGIN = {}
PLUGIN.Name = "Make Plane"
PLUGIN.Description = "Makes a Brush Plane"
PLUGIN.Author = "Anthoni"
function PLUGIN:makePlane( pointA, pointB )
local brush = spark.newBrush()
brush.AddVertex( pointA.x , pointA.y , pointA.z )
brush.AddVertex( pointA.x , pointB.y , pointA.z )
brush.AddVertex( pointB.x , pointA.y , pointB.z )
brush.AddVertex( pointB.x , pointB.y , pointB.z )
end
spark.RegisterPlugin( PLUGIN )<!--c2--></div><!--ec2-->
I don't know something like that. Possibly a way to create a custom UI for each plugin.
<b> Other Suggestions for Spark </b>
-A scriptable Shelf like Maya.
-A command line interface at the bottom for running scripted commands.
Comments
Just tried adding Viewer this way... It doesn't actually launch it. In fact, for some reason, what it actually does is save the project. What.