Blender V2.61 - r43446
|
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_group_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_sequence_types.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_callbacks.h"
#include "BKE_anim.h"
#include "BKE_animsys.h"
#include "BKE_depsgraph.h"
#include "BKE_global.h"
#include "BKE_group.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_pointcache.h"
#include "BKE_scene.h"
#include "BKE_sequencer.h"
#include "BKE_world.h"
#include "BKE_sound.h"
#include "RE_engine.h"
#include <sys/time.h>
Go to the source code of this file.
Definition in file scene.c.
Definition at line 1177 of file scene.c.
References Base::next, NULL, and Scene::set.
Scene* add_scene | ( | const char * | name | ) | [read] |
Definition at line 324 of file scene.c.
References RecastData::agentheight, RecastData::agentmaxclimb, RecastData::agentmaxslope, RecastData::agentradius, alloc_libblock(), GameDome::angle, Scene::audio, FFMpegCodecData::audio_bitrate, FFMpegCodecData::audio_channels, FFMpegCodecData::audio_mixrate, FFMpegCodecData::audio_volume, UserDef::autokey_mode, ToolSettings::autokey_mode, RenderData::bake_filter, RenderData::bake_flag, RenderData::bake_mode, RenderData::bake_normal_space, RenderData::bake_osa, RenderData::bg_stamp, BLI_init_rctf(), BLI_strncpy(), RenderData::blurfac, RenderData::border, ParticleEditSettings::brush, ParticleEditSettings::brushtype, RecastData::cellheight, RecastData::cellsize, RenderData::cfra, RenderData::color_mgt_flag, ToolSettings::cornertype, ParticleBrushData::count, ToolSettings::degr, GameData::depth, RecastData::detailsampledist, RecastData::detailsamplemaxerror, RenderData::displaymode, AudioData::distance_model, GameData::dome, DOME_FISHEYE, AudioData::doppler_factor, ToolSettings::doublimit, ParticleEditSettings::draw_step, RenderData::edgeint, RecastData::edgemaxerror, RecastData::edgemaxlen, ToolSettings::editbutflag, RenderData::efra, ParticleEditSettings::emitterdist, RenderData::engine, ToolSettings::extr_offs, GameData::eyeseparation, ParticleEditSettings::fade_frames, RenderData::ffcodecdata, RenderData::fg_stamp, RenderData::filtertype, GameData::flag, ParticleEditSettings::flag, PhysicsSettings::flag, RenderData::framapto, RenderData::frame_step, RenderData::framelen, GameData::freqplay, RenderData::frs_sec, RenderData::frs_sec_base, G, GAME_DISPLAY_LISTS, GAME_MAT_MULTITEX, RenderData::gauss, Scene::gm, GameData::gravity, PhysicsSettings::gravity, ID_SCE, RenderData::im_format, RenderData::images, ImageFormatData::imtype, ToolSettings::jointrilimit, Scene::lay, Scene::layact, GameData::levelHeight, M_PI, GameData::matmode, GameData::maxlogicstep, GameData::maxphystep, RenderData::mblur_samples, MEM_callocN(), GameData::mode, GameDome::mode, RenderData::mode, ToolSettings::normalsize, NULL, OB_SOLID, GameData::obstacleSimulation, OBSTSIMULATION_NONE, GameData::occlusionRes, RenderData::ocres, RenderData::osa, ToolSettings::particle, PE_AUTO_VELOCITY, PE_BRUSH_CUT, PE_BRUSH_NONE, PE_DEFLECT_EMITTER, PE_KEEP_LENGTHS, PE_LOCK_FIRST, PE_TOT_BRUSH, PHYS_GLOBAL_GRAVITY, Scene::physics_settings, GameData::physicsEngine, GameData::physubstep, RenderData::pic, ImageFormatData::planes, RenderData::postgamma, RenderData::posthue, RenderData::postsat, ToolSettings::proportional_size, ImageFormatData::quality, Scene::r, R_BAKE_CLEAR, R_BAKE_SPACE_TANGENT, R_COLOR_MANAGEMENT, R_DOCOMP, R_DOSEQ, R_ENVMAP, R_EXTENSION, R_FILTER_MITCH, R_GAMMA, R_IMF_IMTYPE_PNG, R_IMF_PLANES_RGB, R_OSA, R_OUTPUT_AREA, R_RAYTRACE, R_RAYTRACE_USE_INSTANCES, R_SEQ_GL_PREV, R_SHADOW, R_SSS, R_STAMP_CAMERA, R_STAMP_DATE, R_STAMP_FILENAME, R_STAMP_FRAME, R_STAMP_RENDERTIME, R_STAMP_SCENE, R_STAMP_TIME, RenderData::raytrace_options, GameData::recastData, RecastData::regionmergesize, RecastData::regionminsize, UserDef::renderdir, GameDome::res, GameDome::resbuf, ToolSettings::rings, RenderData::safety, UnitSettings::scale_length, SCE_SELECT_PATH, SCE_SELECT_VERTEX, RenderData::scemode, Main::scene, scene_add_render_layer(), ToolSettings::segments, ToolSettings::select_thresh, ParticleEditSettings::selectmode, ToolSettings::selectmode, RenderData::seq_flag, RenderData::seq_prev_type, RenderData::seq_rend_type, RenderData::sfra, RenderData::simplify_aosss, RenderData::simplify_particles, RenderData::simplify_shadowsamples, RenderData::simplify_subsurf, ParticleBrushData::size, RenderData::size, ToolSettings::skgen_angle_limit, ToolSettings::skgen_correlation_limit, SKGEN_FILTER_EXTERNAL, SKGEN_FILTER_INTERNAL, SKGEN_FILTER_SMART, SKGEN_HARMONIC, ToolSettings::skgen_length_limit, ToolSettings::skgen_length_ratio, ToolSettings::skgen_options, ToolSettings::skgen_postpro, ToolSettings::skgen_postpro_passes, ToolSettings::skgen_resolution, SKGEN_SMOOTH, SKGEN_STICK_TO_EMBEDDING, SKGEN_SUB_ANGLE, SKGEN_SUB_CORRELATION, SKGEN_SUB_LENGTH, ToolSettings::skgen_subdivisions, ToolSettings::skgen_symmetry_limit, ToolSettings::skgen_threshold_external, ToolSettings::skgen_threshold_internal, sound_create_scene(), AudioData::speed_of_sound, RenderData::stamp, RenderData::stamp_font_id, ParticleBrushData::step, ToolSettings::step, STEREO_ANAGLYPH, STEREO_NOSTEREO, GameData::stereoflag, GameData::stereomode, ParticleBrushData::strength, RenderData::threads, GameData::ticrate, GameDome::tilt, Scene::toolsettings, ParticleEditSettings::totaddkey, ParticleEditSettings::totrekey, ToolSettings::turn, U, Scene::unit, ToolSettings::unwrapper, UV_SELECT_VERTEX, ToolSettings::uv_selectmode, ToolSettings::uvcalc_cubesize, ToolSettings::uvcalc_mapalign, ToolSettings::uvcalc_mapdir, ToolSettings::uvcalc_radius, ToolSettings::vertices, RecastData::vertsperpoly, AudioData::volume, WOPHY_BULLET, RenderData::xasp, rctf::xmax, rctf::xmin, RenderData::xparts, GameData::xplay, RenderData::xsch, RenderData::yasp, rctf::ymax, rctf::ymin, RenderData::yparts, GameData::yplay, and RenderData::ysch.
Referenced by copy_scene(), and scene_new_exec().
float BKE_curframe | ( | Scene * | scene | ) |
Definition at line 912 of file scene.c.
References BKE_frame_to_ctime(), RenderData::cfra, and Scene::r.
Referenced by add_keyblock(), applyModifier(), BKE_ptcache_id_time(), deformVerts(), do_curve_key(), do_latt_key(), do_mesh_key(), draw_new_particle_system(), draw_object(), dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_brushObjectCalculateVelocity(), dynamicPaint_doStep(), explodeMesh(), new_particle_duplilist(), particle_system_update(), pointdensity_cache_psys(), psys_get_particle_state(), RE_init_sample_material(), render_new_particle_system(), scene_update_drivers(), scene_update_for_newframe(), scene_update_tagged(), waveModifier_do(), and where_is_pose().
float BKE_frame_to_ctime | ( | Scene * | scene, |
const float | frame | ||
) |
Definition at line 918 of file scene.c.
References RenderData::framelen, Scene::r, and RenderData::subframe.
Referenced by BKE_curframe(), BKE_ptcache_id_time(), AnimationExporter::create_4x4_source(), object_add_particle_system(), and AnimationExporter::sample_animation().
Definition at line 113 of file scene.c.
References add_scene(), RenderData::avicodecdata, Scene::basact, Scene::base, BKE_copy_animdata_id_action(), BKE_keyingsets_copy(), BLI_duplicatelist(), Scene::camera, QuicktimeCodecData::cdParms, clear_id_newpoins(), copy_libblock(), copy_paint(), copy_world(), GameData::dome, Scene::ed, RenderData::ffcodecdata, ListBase::first, Scene::fps_info, Scene::gm, Object::id, Scene::id, ID_NEW, id_us_plus(), IDP_CopyProperty(), ToolSettings::imapaint, Scene::keyingsets, RenderData::layers, AviCodecData::lpFormat, AviCodecData::lpParms, Scene::markers, MEM_callocN(), MEM_dupallocN(), ID::name, Base::next, Scene::nodetree, ntreeCopyTree(), ntreeSwitchID(), NULL, Scene::obedit, Base::object, ImagePaintSettings::paint, Sculpt::paint, VPaint::paint, ParticleEditSettings::paintcursor, ImagePaintSettings::paintcursor, VPaint::paintcursor, ToolSettings::particle, FFMpegCodecData::properties, RenderData::qtcodecdata, Scene::r, SCE_COPY_EMPTY, SCE_COPY_FULL, SCE_COPY_LINK_DATA, ToolSettings::sculpt, SEQ_DUPE_ALL, Editing::seqbase, seqbase_dupli_recursive(), Scene::set, sound_create_scene(), Scene::stats, Scene::theDag, Scene::toolsettings, Scene::transform_spaces, ToolSettings::vpaint, VPaint::vpaint_prev, GameDome::warptext, Scene::world, ToolSettings::wpaint, and VPaint::wpaint_prev.
Referenced by scene_new_exec().
void free_avicodecdata | ( | AviCodecData * | acd | ) |
Definition at line 86 of file scene.c.
References AviCodecData::cbFormat, AviCodecData::cbParms, AviCodecData::lpFormat, AviCodecData::lpParms, MEM_freeN(), and NULL.
Referenced by free_scene().
void free_qtcodecdata | ( | QuicktimeCodecData * | qcd | ) |
Definition at line 102 of file scene.c.
References QuicktimeCodecData::cdParms, QuicktimeCodecData::cdSize, MEM_freeN(), and NULL.
Referenced by free_scene().
void free_scene | ( | Scene * | sce | ) |
Definition at line 240 of file scene.c.
References Scene::base, BKE_free_animdata(), BKE_keyingsets_free(), BLI_freelistN(), ListBase::first, free_avicodecdata(), free_forest(), free_paint(), free_qtcodecdata(), Scene::gpd, bGPdata::id, Object::id, IDP_FreeProperty(), MEM_freeN(), Base::next, ntreeFreeTree(), NULL, Base::object, ID::properties, seq_free_editing(), sound_destroy_scene(), and ID::us.
Referenced by free_libblock().
float get_render_aosss_error | ( | RenderData * | r, |
float | error | ||
) |
Definition at line 1168 of file scene.c.
References error(), RenderData::mode, R_SIMPLIFY, and RenderData::simplify_aosss.
Referenced by occ_tree_build(), and sss_create_tree_mat().
int get_render_child_particle_number | ( | RenderData * | r, |
int | num | ||
) |
Definition at line 1152 of file scene.c.
References RenderData::mode, R_SIMPLIFY, and RenderData::simplify_particles.
Referenced by get_psys_child_number().
int get_render_shadow_samples | ( | RenderData * | r, |
int | samples | ||
) |
Definition at line 1160 of file scene.c.
References MIN2, RenderData::mode, R_SIMPLIFY, and RenderData::simplify_shadowsamples.
Referenced by make_jitter_weight_tab(), makeshadowbuf(), and testshadowbuf().
int get_render_subsurf_level | ( | RenderData * | r, |
int | lvl | ||
) |
Definition at line 1144 of file scene.c.
References MIN2, RenderData::mode, R_SIMPLIFY, and RenderData::simplify_subsurf.
Referenced by isDisabled(), multires_get_level(), and subsurf_make_derived_from_derived().
Definition at line 644 of file scene.c.
References copy_m4_m4(), F_DUPLI, F_ERROR, F_SCENE, F_START, ListBase::first, free_object_duplilist(), DupliObject::mat, DupliObject::next, Base::next, NULL, DupliObject::ob, OB_DUPLI, OB_FROMDUPLI, object_duplilist(), Object::obmat, and DupliObject::omat.
Referenced by copy_mball_properties(), find_basis_mball(), and init_meta().
Definition at line 535 of file scene.c.
References Scene::base, ListBase::first, Base::next, NULL, and Base::object.
Referenced by add_hook_object_new(), add_to_group(), createTransData(), do_outliner_item_activate(), ed_marker_select(), ED_screen_set_scene(), DocumentImporter::finish(), group_linkobs2scene_cb(), make_links_scene_exec(), make_local_object(), object_delete_cb(), object_delete_exec(), object_deselect_cb(), object_in_any_scene(), object_select_cb(), object_select_mirror_exec(), object_toggle_renderability_cb(), object_toggle_selectability_cb(), object_toggle_visibility_cb(), rem_from_group(), restrictbutton_gr_restrict_flag(), restrictbutton_sel_cb(), restrictbutton_view_cb(), select_grouped_object_hooks(), select_grouped_parent(), set_trans_object_base_flags(), and tree_element_active_pose().
Definition at line 853 of file scene.c.
References Scene::base, BLI_addhead(), Object::flag, Base::flag, Object::lay, Base::lay, MEM_callocN(), and Base::object.
Referenced by add_object(), DocumentImporter::create_instance_node(), and give_base_to_groups().
SceneRenderLayer* scene_add_render_layer | ( | Scene * | sce, |
const char * | name | ||
) | [read] |
Definition at line 1085 of file scene.c.
References BLI_addtail(), BLI_strncpy(), BLI_uniquename(), SceneRenderLayer::lay, RenderData::layers, SceneRenderLayer::layflag, MEM_callocN(), SceneRenderLayer::name, SceneRenderLayer::passflag, Scene::r, SCE_PASS_COMBINED, and SCE_PASS_Z.
Referenced by add_scene(), do_versions(), and render_layer_add_exec().
int scene_camera_switch_update | ( | Scene * | scene | ) |
Definition at line 798 of file scene.c.
References Scene::camera, and scene_camera_switch_find().
Referenced by do_render_all_options(), render_scene(), screen_opengl_render_anim_step(), screen_render_scene_layer_set(), and seq_render_scene_strip_impl().
Definition at line 886 of file scene.c.
References ListBase::first, Scene::id, ID::next, NULL, Main::scene, and Scene::set.
Referenced by set_scene_bg().
void scene_deselect_all | ( | Scene * | sce | ) |
Definition at line 865 of file scene.c.
References Scene::base, ListBase::first, Object::flag, Base::flag, Base::next, Base::object, and SELECT.
Referenced by do_outliner_item_activate(), ed_marker_select(), scene_select_base(), and wm_link_append_exec().
Definition at line 765 of file scene.c.
References Scene::base, ListBase::first, Base::next, NULL, OB_CAMERA, Base::object, and Object::type.
Referenced by BKE_get_tracking_mat(), check_valid_camera(), ED_screen_set_scene(), and viewnumpad_exec().
char* scene_find_last_marker_name | ( | Scene * | scene, |
int | frame | ||
) |
Definition at line 834 of file scene.c.
References ListBase::first, TimeMarker::frame, Scene::markers, MAXFRAME, TimeMarker::name, TimeMarker::next, and NULL.
Referenced by stampdata().
char* scene_find_marker_name | ( | Scene * | scene, |
int | frame | ||
) |
Definition at line 812 of file scene.c.
References ListBase::first, TimeMarker::frame, ListBase::last, Scene::markers, TimeMarker::name, TimeMarker::next, NULL, and TimeMarker::prev.
Referenced by draw_selected_name().
int scene_remove_render_layer | ( | Main * | bmain, |
Scene * | scene, | ||
SceneRenderLayer * | srl | ||
) |
Definition at line 1105 of file scene.c.
References RenderData::actlay, BLI_findindex(), BLI_remlink(), CMP_NODE_R_LAYERS, bNode::custom1, ListBase::first, bNode::id, Scene::id, ListBase::last, RenderData::layers, MEM_freeN(), bNode::next, ID::next, bNodeTree::nodes, Scene::nodetree, Scene::r, Main::scene, and bNode::type.
Referenced by render_layer_remove_exec().
Definition at line 875 of file scene.c.
References Scene::basact, Object::flag, Base::flag, Base::object, scene_deselect_all(), and SELECT.
Referenced by add_object(), and createRepresentation().
Definition at line 933 of file scene.c.
References Scene::adt, ADT_RECALC_DRIVERS, BKE_animdata_from_id(), BKE_animsys_evaluate_animdata(), BKE_curframe(), AnimData::drivers, ListBase::first, Scene::id, Scene::nodetree, and Scene::world.
Referenced by scene_update_tagged_recursive().
Definition at line 1034 of file scene.c.
References BKE_animsys_evaluate_all_animation(), BKE_curframe(), BLI_CB_EVT_FRAME_CHANGE_POST, BLI_CB_EVT_FRAME_CHANGE_PRE, BLI_CB_EVT_SCENE_UPDATE_POST, BLI_CB_EVT_SCENE_UPDATE_PRE, BLI_exec_cb(), RenderData::cfra, DAG_ids_check_recalc(), DAG_ids_clear_recalc(), DAG_ids_flush_tagged(), DAG_scene_sort(), DAG_scene_update_flags(), Scene::id, NULL, Scene::r, scene_update_tagged_recursive(), Scene::set, sound_set_cfra(), Scene::theDag, and TRUE.
Referenced by BKE_ptcache_bake(), database_fromscene_vectors(), do_render_composite_fields_blur_3d(), ED_update_for_newframe(), motionpaths_calc_update_scene(), ptcache_bake_thread(), RE_BlenderAnim(), RE_Database_FromScene(), RE_engine_render(), redraw_timer_exec(), screen_opengl_render_anim_step(), screen_opengl_render_end(), seq_render_scene_strip_impl(), and sound_bake_animation_exec().
Definition at line 995 of file scene.c.
References ADT_RECALC_ANIM, BKE_animdata_from_id(), BKE_animsys_evaluate_animdata(), BKE_curframe(), BKE_ptcache_quick_cache_all(), BLI_CB_EVT_SCENE_UPDATE_POST, BLI_CB_EVT_SCENE_UPDATE_PRE, BLI_exec_cb(), DAG_ids_check_recalc(), DAG_ids_clear_recalc(), DAG_ids_flush_tagged(), FALSE, Scene::id, Scene::physics_settings, PhysicsSettings::quick_cache_step, AnimData::recalc, and scene_update_tagged_recursive().
Referenced by wm_event_do_notifiers().
static void scene_update_tagged_recursive | ( | Main * | bmain, |
Scene * | scene, | ||
Scene * | scene_parent | ||
) | [static] |
Definition at line 962 of file scene.c.
References Scene::base, Scene::customdata_mask, Object::dup_group, ListBase::first, group_handle_recalc_and_update(), Object::lay, Base::lay, Base::next, OB_DUPLIGROUP, Base::object, object_handle_update(), scene_update_drivers(), Scene::set, sound_update_scene(), and Object::transflag.
Referenced by scene_update_for_newframe(), and scene_update_tagged().
int scene_use_new_shading_nodes | ( | Scene * | scene | ) |
Definition at line 1200 of file scene.c.
References RenderData::engine, RenderEngineType::flag, Scene::r, RE_engines_find(), and RE_USE_SHADING_NODES.
Referenced by buttons_texture_context_compute(), draw_glsl_material(), draw_mesh_textured(), ED_node_shader_default(), ED_uvedit_assign_image(), ED_view3d_datamask(), foreach_nodeclass(), GPU_begin_object_materials(), GPU_material_from_blender(), image_refresh(), imapaint_face_image(), list_item_row(), new_material_exec(), new_world_exec(), node_add_menu(), object_lamp_add_exec(), project_state_init(), and ui_node_menu_column().
Definition at line 547 of file scene.c.
References Scene::base, Object::ctime, DAG_scene_sort(), ListBase::first, Base::flag, Object::flag, Group::gobject, Main::group, Group::id, Object::id, Base::lay, Object::lay, Object::mode, Base::next, GroupObject::next, ID::next, NULL, GroupObject::ob, OB_FROMGROUP, OB_MODE_EDIT, Scene::obedit, Base::object, Main::object, scene_check_setscene(), SELECT, Scene::set, and Scene::theDag.
Referenced by ED_screen_set_scene(), game_engine_exec(), ntree_render_scenes(), render_scene(), set_scene_name(), and setup_app_data().
Definition at line 604 of file scene.c.
References find_id(), G, NULL, and set_scene_bg().
Referenced by set_scene().
Definition at line 617 of file scene.c.
References clear_scene_in_allseqs(), clear_scene_in_nodes(), ListBase::first, free_libblock(), bScreen::id, Scene::id, ID::next, NULL, bScreen::scene, Main::scene, Main::screen, and Scene::set.
Referenced by ED_screen_delete_scene().