Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene.c249
1 files changed, 183 insertions, 66 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index e8c8861e2f9..f02cba1397c 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -35,6 +35,10 @@
/* Include for Bake Options */
#include "RE_pipeline.h"
+#ifdef WITH_QUICKTIME
+#include "quicktime_export.h"
+#endif
+
#ifdef WITH_FFMPEG
#include "BKE_writeffmpeg.h"
#include <libavcodec/avcodec.h>
@@ -44,7 +48,7 @@
#include "WM_types.h"
-EnumPropertyItem snap_mode_items[] = {
+EnumPropertyItem snap_target_items[] = {
{SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target."},
{SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target."},
{SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target."},
@@ -52,20 +56,34 @@ EnumPropertyItem snap_mode_items[] = {
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem proportional_falloff_items[] ={
- {PROP_SMOOTH, "SMOOTH", 0, "Smooth", ""},
- {PROP_SPHERE, "SPHERE", 0, "Sphere", ""},
- {PROP_ROOT, "ROOT", 0, "Root", ""},
- {PROP_SHARP, "SHARP", 0, "Sharp", ""},
- {PROP_LIN, "LINEAR", 0, "Linear", ""},
- {PROP_CONST, "CONSTANT", 0, "Constant", ""},
- {PROP_RANDOM, "RANDOM", 0, "Random", ""},
+ {PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
+ {PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", ""},
+ {PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", ""},
+ {PROP_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
+ {PROP_LIN, "LINEAR", ICON_LINCURVE, "Linear", ""},
+ {PROP_CONST, "CONSTANT", ICON_NOCURVE, "Constant", ""},
+ {PROP_RANDOM, "RANDOM", ICON_RNDCURVE, "Random", ""},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem proportional_editing_items[] = {
- {PROP_EDIT_OFF, "DISABLED", 0, "Disable", ""},
- {PROP_EDIT_ON, "ENABLED", 0, "Enable", ""},
- {PROP_EDIT_CONNECTED, "CONNECTED", 0, "Connected", ""},
+ {PROP_EDIT_OFF, "DISABLED", ICON_PROP_OFF, "Disable", ""},
+ {PROP_EDIT_ON, "ENABLED", ICON_PROP_ON, "Enable", ""},
+ {PROP_EDIT_CONNECTED, "CONNECTED", ICON_PROP_CON, "Connected", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem mesh_select_mode_items[] = {
+ {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
+ {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
+ {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
+ {0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem snap_element_items[] = {
+ {SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid."},
+ {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices."},
+ {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges."},
+ {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces."},
+ {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume."},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -80,12 +98,14 @@ EnumPropertyItem proportional_editing_items[] = {
#include "BKE_node.h"
#include "BKE_pointcache.h"
#include "BKE_scene.h"
+#include "BKE_depsgraph.h"
#include "BLI_threads.h"
#include "ED_info.h"
#include "ED_node.h"
#include "ED_view3d.h"
+#include "ED_object.h"
#include "RE_pipeline.h"
@@ -97,6 +117,34 @@ static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base*)internal->link)->object);
}
+static void rna_Scene_link_object(Scene *sce, ReportList *reports, Object *ob)
+{
+ Base *base= object_in_scene(ob, sce);
+ if (base) {
+ BKE_report(reports, RPT_ERROR, "Object is already in this scene.");
+ return;
+ }
+ base= scene_add_base(sce, ob);
+ ob->id.us++;
+
+ /* this is similar to what object_add_type and add_object do */
+ ob->lay= base->lay= sce->lay;
+ ob->recalc |= OB_RECALC;
+
+ DAG_scene_sort(sce);
+}
+
+static void rna_Scene_unlink_object(Scene *sce, ReportList *reports, Object *ob)
+{
+ Base *base= object_in_scene(ob, sce);
+ if (!base) {
+ BKE_report(reports, RPT_ERROR, "Object is not in this scene.");
+ return;
+ }
+ /* as long as ED_base_object_free_and_unlink calls free_libblock_us, we don't have to decrement ob->id.us */
+ ED_base_object_free_and_unlink(sce, base);
+}
+
static void rna_Scene_skgen_etch_template_set(PointerRNA *ptr, PointerRNA value)
{
ToolSettings *ts = (ToolSettings*)ptr->data;
@@ -320,6 +368,9 @@ static void rna_SceneRenderData_file_format_set(PointerRNA *ptr, int value)
#ifdef WITH_FFMPEG
ffmpeg_verify_image_type(rd);
#endif
+#ifdef WITH_QUICKTIME
+ quicktime_verify_image_type(rd);
+#endif
}
void rna_SceneRenderData_jpeg2k_preset_update(RenderData *rd)
@@ -524,19 +575,6 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{UV_SELECT_ISLAND, "ISLAND", ICON_UV_ISLANDSEL, "Island", "Island selection mode."},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem mesh_select_mode_items[] = {
- {SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode."},
- {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode."},
- {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode."},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem snap_element_items[] = {
- {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices."},
- {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges."},
- {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces."},
- {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume."},
- {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem auto_key_items[] = {
{AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
{AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
@@ -610,33 +648,39 @@ static void rna_def_tool_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "snap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
- RNA_def_property_ui_text(prop, "Snap", "Snap while Ctrl is held during transform.");
- RNA_def_property_ui_icon(prop, ICON_SNAP_GEAR, 1);
+ RNA_def_property_ui_text(prop, "Snap", "Snap during transform.");
+ RNA_def_property_ui_icon(prop, ICON_SNAP_OFF, 1);
+ RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target.");
RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
+ RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
RNA_def_property_enum_items(prop, snap_element_items);
RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to.");
+ RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
- prop= RNA_def_property(srna, "snap_mode", PROP_ENUM, PROP_NONE);
+ prop= RNA_def_property(srna, "snap_target", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "snap_target");
- RNA_def_property_enum_items(prop, snap_mode_items);
- RNA_def_property_ui_text(prop, "Snap Mode", "Which part to snap onto the target.");
+ RNA_def_property_enum_items(prop, snap_target_items);
+ RNA_def_property_ui_text(prop, "Snap Target", "Which part to snap onto the target.");
+ RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_peel_object", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
+ RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
prop= RNA_def_property(srna, "snap_project", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT);
RNA_def_property_ui_text(prop, "Project Individual Elements", "DOC_BROKEN");
RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
+ RNA_def_property_update(prop, NC_SCENE|ND_MODE, NULL); /* header redraw */
/* Auto Keying */
prop= RNA_def_property(srna, "enable_auto_key", PROP_BOOLEAN, PROP_NONE);
@@ -1079,20 +1123,18 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem stereo_modes_items[] ={
-// {STEREO_NOSTEREO, "NO_STEREO", 0, "No Stereo", ""},
{STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""},
{STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""},
{STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""},
{STEREO_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", ""},
{STEREO_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-side", ""},
{STEREO_VINTERLACE, "VINTERLACE", 0, "Vinterlace", ""},
-// {STEREO_DOME, "DOME", 0, "Dome", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem stereo_items[] ={
- {STEREO_NOSTEREO, "NONE", 0, "None", ""},
- {STEREO_ENABLED, "STEREO", 0, "Stereo", ""},
- {STEREO_DOME, "DOME", 0, "Dome", ""},
+ {STEREO_NOSTEREO, "NONE", 0, "None", "Disable Stereo and Dome environments"},
+ {STEREO_ENABLED, "STEREO", 0, "Stereo", "Enable Stereo environment"},
+ {STEREO_DOME, "DOME", 0, "Dome", "Enable Dome environment"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem physics_engine_items[] = {
@@ -1155,7 +1197,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "framing_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "framing.col");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "", "");
+ RNA_def_property_ui_text(prop, "Framing Color", "Set colour of the bars");
RNA_def_property_update(prop, NC_SCENE, NULL);
/* Stereo */
@@ -1168,14 +1210,14 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "stereo_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "stereomode");
RNA_def_property_enum_items(prop, stereo_modes_items);
- RNA_def_property_ui_text(prop, "Stereo Mode", "");
+ RNA_def_property_ui_text(prop, "Stereo Mode", "Stereographic techniques");
RNA_def_property_update(prop, NC_SCENE, NULL);
/* Dome */
prop= RNA_def_property(srna, "dome_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dome.mode");
RNA_def_property_enum_items(prop, dome_modes_items);
- RNA_def_property_ui_text(prop, "Dome Mode", "");
+ RNA_def_property_ui_text(prop, "Dome Mode", "Dome physical configurations");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "dome_tesselation", PROP_INT, PROP_NONE);
@@ -1485,7 +1527,11 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{R_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", ""},
#endif
#ifdef WITH_QUICKTIME
+# ifdef USE_QTKIT
+ {R_QUICKTIME, "QUICKTIME_QTKIT", ICON_FILE_MOVIE, "QuickTime", ""},
+# else
{R_QUICKTIME, "QUICKTIME", ICON_FILE_MOVIE, "QuickTime", ""},
+# endif
#endif
#ifdef __sgi
{R_MOVIE, "MOVIE", ICON_FILE_MOVIE, "Movie", ""},
@@ -1532,6 +1578,23 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{16, "16", 0, "16", "16 bit color channels"},
{0, NULL, 0, NULL, NULL}};
#endif
+
+#ifdef WITH_QUICKTIME
+ static EnumPropertyItem quicktime_codec_type_items[] = {
+ {QT_CODECTYPE_RAW, "RAW", 0, "Uncompressed", ""},
+ {QT_CODECTYPE_JPEG, "JPEG", 0, "JPEG", ""},
+ {QT_CODECTYPE_MJPEGA, "MJPEG_A", 0, "M-JPEG A", ""},
+ {QT_CODECTYPE_MJPEGB, "MJPEG_B", 0, "M-JPEG B", ""},
+ {QT_CODECTYPE_DVCPAL, "DVCPAL", 0, "DV PAL", ""},
+ {QT_CODECTYPE_DVCNTSC, "DVCNTSC", 0, "DV/DVCPRO NTSC", ""},
+ {QT_CODECTYPE_DVCPROHD720p, "DVCPROHD720P", 0, "DVCPRO HD 720p"},
+ {QT_CODECTYPE_DVCPROHD1080i50, "DVCPROHD1080I50", 0, "DVCPRO HD 1080i50"},
+ {QT_CODECTYPE_DVCPROHD1080i60, "DVCPROHD1080I60", 0, "DVCPRO HD 1080i60"},
+ {QT_CODECTYPE_MPEG4, "MPEG4", 0, "MPEG4", ""},
+ {QT_CODECTYPE_H263, "H263", 0, "H.263", ""},
+ {QT_CODECTYPE_H264, "H264", 0, "H.264", ""},
+ {0, NULL, 0, NULL, NULL}};
+#endif
#ifdef WITH_FFMPEG
static EnumPropertyItem ffmpeg_format_items[] = {
@@ -1636,7 +1699,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
/* JPEG and AVI JPEG */
- prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies.");
@@ -1722,6 +1785,22 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
+#ifdef WITH_QUICKTIME
+ /* QuickTime */
+
+ prop= RNA_def_property(srna, "quicktime_codec_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "qtcodecsettings.codecType");
+ RNA_def_property_enum_items(prop, quicktime_codec_type_items);
+ RNA_def_property_ui_text(prop, "Codec", "QuickTime codec type");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "quicktime_codec_spatial_quality", PROP_INT, PROP_PERCENTAGE);
+ RNA_def_property_int_sdna(prop, NULL, "qtcodecsettings.codecSpatialQuality");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Spatial quality", "Intra-frame spatial quality level");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+#endif
+
#ifdef WITH_FFMPEG
/* FFMPEG Video*/
@@ -2249,11 +2328,71 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering engine is a game engine.");
}
+
+/* scene.objects */
+static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ FunctionRNA *func;
+ PropertyRNA *parm;
+
+ RNA_def_property_srna(cprop, "SceneObjects");
+ srna= RNA_def_struct(brna, "SceneObjects", NULL);
+ RNA_def_struct_sdna(srna, "Scene");
+ RNA_def_struct_ui_text(srna, "Scene Objects", "Collection of scene objects.");
+
+ func= RNA_def_function(srna, "link", "rna_Scene_link_object");
+ RNA_def_function_ui_description(func, "Link object to scene.");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ parm= RNA_def_pointer(func, "object", "Object", "", "Object to add to scene.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ func= RNA_def_function(srna, "unlink", "rna_Scene_unlink_object");
+ RNA_def_function_ui_description(func, "Unlink object from scene.");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene.");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_pointer_funcs(prop, "rna_Scene_active_object_get", "rna_Scene_active_object_set", NULL);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Active Object", "Active object for this scene.");
+ /* Could call: ED_base_object_activate(C, scene->basact);
+ * but would be a bad level call and it seems the notifier is enough */
+ RNA_def_property_update(prop, NC_SCENE|ND_OB_ACTIVE, NULL);
+}
+
+
+/* scene.bases.* */
+static void rna_def_scene_bases(BlenderRNA *brna, PropertyRNA *cprop)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+// FunctionRNA *func;
+// PropertyRNA *parm;
+
+ RNA_def_property_srna(cprop, "SceneBases");
+ srna= RNA_def_struct(brna, "SceneBases", NULL);
+ RNA_def_struct_sdna(srna, "Scene");
+ RNA_def_struct_ui_text(srna, "Scene Bases", "Collection of scene bases.");
+
+ prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "ObjectBase");
+ RNA_def_property_pointer_sdna(prop, NULL, "basact");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Active Base", "Active object base in the scene.");
+ RNA_def_property_update(prop, NC_SCENE|ND_OB_ACTIVE, NULL);
+}
+
void RNA_def_scene(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- PropertyRNA *prop_act;
+// PropertyRNA *prop_act;
FunctionRNA *func;
static EnumPropertyItem audio_distance_model_items[] = {
@@ -2280,7 +2419,6 @@ void RNA_def_scene(BlenderRNA *brna)
prop= RNA_def_property(srna, "set", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "set");
RNA_def_property_struct_type(prop, "Scene");
- //RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL);
RNA_def_property_ui_text(prop, "Set Scene", "Background set scene.");
@@ -2299,37 +2437,16 @@ void RNA_def_scene(BlenderRNA *brna)
/* Bases/Objects */
prop= RNA_def_property(srna, "bases", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
- RNA_def_property_struct_type(prop, "Base");
+ RNA_def_property_struct_type(prop, "ObjectBase");
RNA_def_property_ui_text(prop, "Bases", "");
-
- { /* Collection active property */
- prop_act= RNA_def_property(srna, "base_active", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop_act, "Base");
- RNA_def_property_pointer_sdna(prop_act, NULL, "basact");
- RNA_def_property_flag(prop_act, PROP_EDITABLE);
- RNA_def_property_ui_text(prop_act, "Active Base", "Active object in the scene.");
- RNA_def_property_update(prop_act, NC_SCENE|ND_OB_ACTIVE, NULL);
- RNA_def_property_collection_active(prop, prop_act);
- }
+ rna_def_scene_bases(brna, prop);
prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_ui_text(prop, "Objects", "");
- RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0, 0, 0);
-
- { /* Collection active property */
- prop_act= RNA_def_property(srna, "objects_active", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop_act, "Object");
- RNA_def_property_pointer_funcs(prop_act, "rna_Scene_active_object_get", "rna_Scene_active_object_set", NULL);
- RNA_def_property_flag(prop_act, PROP_EDITABLE);
- RNA_def_property_ui_text(prop_act, "Object", "Object to use as projector transform.");
- /* Could call: ED_base_object_activate(C, scene->basact);
- * but would be a bad level call and it seems the notifier is enough */
- RNA_def_property_update(prop_act, NC_SCENE|ND_OB_ACTIVE, NULL);
-
- RNA_def_property_collection_active(prop, prop_act);
- }
+ RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0);
+ rna_def_scene_objects(brna, prop);
/* Layers */
prop= RNA_def_property(srna, "visible_layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
@@ -2486,7 +2603,7 @@ void RNA_def_scene(BlenderRNA *brna)
prop= RNA_def_property(srna, "sync_audio", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
- RNA_def_property_ui_text(prop, "Audio Sync", "Play back and sync with audio from Sequence Editor.");
+ RNA_def_property_ui_text(prop, "Audio Sync", "Play back and sync with audio from Sequence Editor for realtime playback.");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "scrub_audio", PROP_BOOLEAN, PROP_NONE);