Skip to: site menu | section menu | main content

Breeze Designer

3D Modelling and Design
Currently viewing: Breeze Designer »Welcome

Breeze Designer Macros

Breeze Designer 2.0.7 and later use the Microsoft ActiveScript engine to run macros. This means macros may be written in Visual BASIC, JavaScript, PerlScript or PythonScript depending on the interpreters loaded. A number of samples, written in Visual BASIC, are provided to demonstrate some of the language extensions. These may be found in the macros sub-directory. To set the language type add $ on the first line followed by the name of the language ie $VisualBasic selected the Visual BASIC interpreter. Updates of the ActiveScript engine may be found at:

The Breeze Designer macro support requires that an ActiveScript supporting application like Microsoft Internet Explorer, Microsoft Office 97, Microsoft Visual C++ 5.0 / 6.0, or the above scripting pack has been installed prior to running Breeze Designer scripts.

Language extensions
All the following functions are available though the Breeze Designer scene object. This object is pre-created when using macros from within Breeze Designer. That is to use any on the following functions a scene. should be added to the front of the function.

Scene functions

New Delete all contents of the current scene
Load Filename Load an external file into the current scene
Save Filename, Format Save the current scene using the given format
Render Render the current scene with the default renderer
Move x, y, z Translate the selected object(s) also MoveObjects
Scale x, y, z Scale the selected object(s) also ScaleObjects
Rotate ax, ay, az Rotate the selected object(s) also RotateObjects
RotateAbout ax,ay,az, x, y, z Rotate by angle ax,ay,az about pivot point x,y,z
ScaleAbout sx,sy,sz, x, y, z Scale by sx,sy,sz about pivot point x,y,z
CreateAnimation Name frames Create a new animation n frames long
AnimateObjectName Name Add the named object to the current animation
AnimateObject Handle Add the named object to the current animation
GotoFrame Number Set the current animation frame (as piSetFrame)
GetMaxFrame Return the number of frames in the current animation
SetFrame number Reserved
SetScenePropertyX PropertyName, variant Set the current scene properties
Redraw Redraw the current scene in all views
RebuildObjects Apply current settings and re-create the current selected object(s)

Object functions

CreateObject Name, Type Create an object of nominated type, returns handle
CreateDefaultObjectType Create a default object of nominated type, returns handle. By default this handle is freed. See AutoFree for further details
FindObject Name Finds object of name and returns a handle
GetObject Handle, Flags Get object based on search flags
GetObjectCount Flags Get object count based on search flags
SelectObject Handle, Flags Selects or deselect and object
ClearSelection Clears the current selection
DeleteObject Handle Delete the attached object & geometry
FreeObject Handle Free a created object handle
AddPoint Handle, x, y, z Add a point to a point object
AddFacet Handle, x1 ... z3 Add a facet to a polygon object
GetPropertyId PropertyName Get a property type identifier from a text description
GetProperty Handle, PropertyId Get an object property
GetPoint Handle, flags Get a point or polygon from object using search flags. Returns handle
GetPointValue Handle, flags Get a point value from point handle, 0=X1, 1=Y1 .. 8=Z3
SetObjectPropertyX Handle, type, variant Set object property, also SetPropX. See below for discussion on value.
SetTexturePropertyXHandle, variant value Set a defined texture property field of a user defined texture attached to the current object.
SetCursor x, y, z Set 3D cursor to position
SetSize Handle, x, y, z Set the object unity size
SetColor Handle, Name Apply the named color to the selected object(s)
SetTexture Handle, Name Apply the named texture to the selected objects(s)
SetExtra String Applies object specific additional information in a string format. (Reserved)
SelectName Name Selects an existing object by name
SelectGroup Name Selects all objects in the named group
RebuildObject Handle Apply current settings and re-create object
GetBound Boundobject Get the bounding vales of the selected object(s)
GetTexture Handle Get the texture name of the selected objects(s)

Other functions

CallPlugin name Call a plugin function
SetPluginPropertyX Name, variant property value Set a plugin function property
Transform Name Execute a named transformation on selected objects
GetFileName Flag, filter Get a file name from save/load flag with file filter

Object definitions
The following groups of object types are currently supported by the CreateObject and CreateDefaultObject functions:

BOX 20

The point, line and polygon are special case objects and can not be created with the CreateDefaultObject function. These objects represent on object that is a collection of points, lines and polygons respectively. The heightfield, text and userdefined objects require additional property information before they can be exported.

Object Properties

Size 1 Object unity size, usually 1,1,1
Extra 2 General point value attached to object
Scale 3 Scale
Rotate 4 Rotation about center
Translate 5 Position
LookAt 6 Look-at point for camera
Up 7 Up vector point for camera
Direction 8 View direction point for camera
Right 9 Right vector point for camera
Type 101 Object type
Flags 102 Object general flags
Group 103 Group indentifier
Select 104 Select flag
Rgb 105 Preview RGB color
Csg 106 Csg operation if within group
Attribute 108 Reserved
MaterialType 107 Reserved
LightType 110 Type of light object 0=Omni, 1=Spot, 2=Area
LightTightness 111 Spot light tighness
LightAdaptive 112 Area light adaptive
LightJitter 112 Area light jitter
Name 201 Object name
Material 202 Material name ie texture name
PluginSignature 203 Plugin that created object
TextObjectString 204 Text for text object
HeightfieldName 205 File name used for heightfield
Comment 301 Comment field
VrmlAnchor 302 VRML anchor
VrmlInline 303 VRML inline text
UserInline 304 User defined text written out in export

Search flags

Any 0 Get any object
First 1 Get the first object
Next 2 Get the next object, use after first
Selected 4 Combine with other flags for selected mask
Last 8 Get the last object

The any and last flags are not supported by all functions.

Points, line segments and polygon objects are empty by default. Only one camera may be created in a given scene. Text, height fields, blobs and user defined require additional information before they may be exported.

Property functions implement named functions for each variable type supported ie to set an integer object property the function SetPropInt or SetObjectPropertyInt should be used. Below is a table describing the supported object types:

  • Int - 1 argument Integer
  • Dbl - 1 argument Double or floating point
  • Str - 1 argument String or quoted string
  • Pnt - 3 arguments 3D point

Variant data versions are also available for each of the property functions. Within ActiveAcript this allows the function to be called directly without explicitly specifying the argument type. Current there is no variant support for point data types.

There are a number of system variables, or properties, available from the macro language. These allow changes to be made to the macro run time environment. These variables include:

  • AutoFree - default 1. Automatically free any objects created with CreateDefaultObject
  • AutoRefresh - default 1.
  • Version - Variable. This contains the current Breeze Designer version
  • ShowErrors - default 1. Display a error message dialog is an error is encountered

By default views are updated after any visual operation is performed. This property should be restored before completing a script if it is disabled during a script.

The following is an example of a simple VisualBASIC script:

	Sub main()
		h = Scene.CreateDefaultObject( CYLINDER )
		Scene.FreeObject( h )
	End sub
This example creates a new scene containing a cylinder. Be sure to call the save function if you wish to keep the scene after it has been constructed. Properties available from the macro language are also available from the OLE-Automation interface. Refer to the Microsoft OLE-Automation for further information of this interface. Refer to the plug-in function descriptions for further function information.

Back to top