Objects API.
Additional topics in the User Manual: Object Transform API, Get Object API, Object Selection, Copying Objects (Instancing)
- Source:
Summary
Methods
- copy(obj, name, deep_copyopt) → {Object3D}
- create_line(name)
- get_custom_prop(obj) → {*}
- get_dg_parent(obj) → (nullable) {Object3D}
- get_meta_tags(obj) → {module:objects~ObjectMetaTags}
- get_outlining_objects() → {Array.<Object3D>}
- get_parent(obj) → (nullable) {Object3D}
- get_selectable_objects() → {Array.<Object3D>}
- get_wind_bending_params(obj) → {module:objects~WindBendingParams}
- hide_all_by_data_id(data_id)
- is_armature(obj) → {boolean}
- is_camera(obj) → {boolean}
- is_dynamic(obj) → {boolean}
- is_empty(obj) → {boolean}
- is_lamp(obj) → {boolean}
- is_line(obj) → {boolean}
- is_mesh(obj) → {boolean}
- is_speaker(obj) → {boolean}
- is_world(obj) → {boolean}
- set_wind_bending_params(obj, wb_params)
- show_all_by_data_id(data_id)
- update_boundings(obj)
Type Definitions
Detailed Description
Methods
copy(obj, name, deep_copyopt) → {Object3D}
create_line(name)
Create line object
Parameters:
Name | Type | Description |
---|---|---|
name |
string | Line object name |
- Source:
get_custom_prop(obj) → {*}
Get the Blender-assigned custom property field from the object.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Object custom property field
- Type
- *
- Source:
get_dg_parent(obj) → (nullable) {Object3D}
get_meta_tags(obj) → {ObjectMetaTags}
Get the Blender-assigned meta tags from the object.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Object meta tags
- Type
- ObjectMetaTags
- Source:
get_outlining_objects() → {Array.<Object3D>}
Get all scene outlining objects.
Returns:
Array with outlining objects.
- Type
- Array.<Object3D>
- Source:
get_parent(obj) → (nullable) {Object3D}
get_selectable_objects() → {Array.<Object3D>}
Get all scene selectable objects.
Returns:
Array with selectable objects.
- Type
- Array.<Object3D>
- Source:
get_wind_bending_params(obj) → {WindBendingParams}
Get object's wind bending parameters. Object must be dynamic.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Wind Bending parameters
- Type
- WindBendingParams
- Source:
hide_all_by_data_id(data_id)
Hide objects that have the given data_id.
Parameters:
Name | Type | Description |
---|---|---|
data_id |
number | ID of loaded data. |
- Source:
Example
var m_obj = require("objects");
m_obj.hide_all_by_data_id(0);
is_armature(obj) → {boolean}
Check if the object is an ARMATURE.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Checking result.
- Type
- boolean
- Source:
is_camera(obj) → {boolean}
Check if the object is a CAMERA.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Checking result.
- Type
- boolean
- Source:
is_dynamic(obj) → {boolean}
Check if object is dynamic.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Checking result.
- Type
- boolean
- Source:
is_empty(obj) → {boolean}
Check if the object is an EMPTY.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Checking result.
- Type
- boolean
- Source:
is_lamp(obj) → {boolean}
Check if the object is a LAMP.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Checking result.
- Type
- boolean
- Source:
is_line(obj) → {boolean}
Check if the object is a LINE.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Checking result.
- Type
- boolean
- Source:
is_mesh(obj) → {boolean}
Check if the object is a MESH.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Checking result.
- Type
- boolean
- Source:
is_speaker(obj) → {boolean}
Check if the object is a SPEAKER.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Checking result.
- Type
- boolean
- Source:
is_world(obj) → {boolean}
Check if the object is a WORLD.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
Returns:
Checking result.
- Type
- boolean
- Source:
set_wind_bending_params(obj, wb_params)
Set object's wind bending parameters. Object must be dynamic.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
wb_params |
WindBendingParams | Wind Bending parameters |
- Source:
Example
var m_obj = require("objects");
var wb_params =
{
angle: 45,
main_frequency: 0.25,
detail_frequency: 1,
detail_amplitude: 0.1,
branch_amplitude: 0.3
};
m_obj.set_wind_bending_params(obj, wb_params);
show_all_by_data_id(data_id)
Show objects that have the given data_id.
Parameters:
Name | Type | Description |
---|---|---|
data_id |
number | ID of loaded data. |
- Source:
Example
var m_obj = require("objects");
m_obj.show_all_by_data_id(1);
update_boundings(obj)
Update object's boundings (box, cone, cylinder, ellipsoid, sphere, capsule).
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object3D | Object 3D |
- Source:
Type Definitions
ObjectMetaTags
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
title |
string | The title meta tag. |
description |
string | The description meta tag. |
category |
string | The category meta tag. |
- Source:
WindBendingParams
Wind bending params.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
angle |
number | Angle of main wind bending in degrees |
main_frequency |
number | Frequency of main wind bending |
detail_frequency |
number | Frequency of detail wind bending |
detail_amplitude |
number | Amplitude of detail wind bending |
branch_amplitude |
number | Amplitude of branches wind bending |
- Source: