56static void rna_Scene_frame_set(
Scene *scene,
Main *bmain,
int frame,
float subframe)
58 double cfra = double(frame) + double(subframe);
67 for (
ViewLayer *view_layer = scene->view_layers.first(); view_layer !=
nullptr;
68 view_layer = view_layer->next)
79 for (
bScreen *screen = bmain->screens.first(); screen;
80 screen =
static_cast<bScreen *
>(screen->id.next))
88 if (!
G.is_rendering) {
98static void rna_Scene_uvedit_aspect(
Scene * ,
Object *ob,
float aspect[2])
101 Mesh *
mesh = id_cast<Mesh *>(ob->data);
108 aspect[0] = aspect[1] = 1.0f;
111static void rna_SceneRender_get_frame_path(
ID *
id,
147 (frame == INT_MIN) ? rd->cfra : frame,
153 if (!errors.is_empty()) {
159static void rna_Scene_ray_cast(
Scene * ,
160 Depsgraph *depsgraph,
161 const float origin[3],
162 const float direction[3],
171 float direction_unit[3];
177 snap_object_params.ignore_editmode_filtering =
true;
190 (
float (*)[4])r_obmat);
194 if (r_ob !=
nullptr && *r_ob !=
nullptr) {
204 unit_m4(
reinterpret_cast<float (*)[4]
>(r_obmat));
210static void rna_Scene_sequencer_editing_free(
Scene *scene)
228 func,
"Set scene frame updating all objects and view layers immediately");
233 func,
"subframe", 0.0, 0.0, 1.0,
"",
"Subframe time, between 0.0 and 1.0", 0.0, 1.0);
241 func,
"result", 2,
nullptr, 0.0f,
FLT_MAX,
"",
"aspect", 0.0f,
FLT_MAX);
249 parm =
RNA_def_pointer(func,
"depsgraph",
"Depsgraph",
"",
"The current dependency graph");
275 "The hit location of this ray cast",
287 "The face normal at the ray cast hit location",
293 func,
"index", 0, 0, 0,
"",
"The face index, -1 when original data isn't available", 0, 0);
299 "The original (un-evaluated) object that was hit. "
300 "Note that ``location``, ``normal``, and ``index`` "
301 "correspond to the evaluated object's mesh.");
303 parm =
RNA_def_float_matrix(func,
"matrix", 4, 4,
nullptr, 0.0f, 0.0f,
"",
"Matrix", 0.0f, 0.0f);
307 func =
RNA_def_function(srna,
"sequence_editor_create",
"seq::editing_ensure");
309 parm =
RNA_def_pointer(func,
"sequence_editor",
"SequenceEditor",
"",
"Sequence editor data");
313 func =
RNA_def_function(srna,
"sequence_editor_clear",
"rna_Scene_sequencer_editing_free");
322 func =
RNA_def_function(srna,
"frame_path",
"rna_SceneRender_get_frame_path");
325 func,
"Return the absolute path to the filename to be written for a given frame");
332 "Frame number to use, if unset the current frame will be used",
335 RNA_def_boolean(func,
"preview",
false,
"Preview",
"Use preview range");
341 "The name of the view to use to replace the \"%\" chars");
347 "The resulting filepath from the scenes render settings");
#define BVH_RAYCAST_DIST_MAX
#define BPy_BEGIN_ALLOW_THREADS
#define BPy_END_ALLOW_THREADS
void editing_free(Scene *scene, const bool do_id_user)
void WM_main_add_notifier(uint type, void *reference)
PropertyRNA * RNA_def_string_file_path(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph)
void MOV_filepath_from_settings(char filepath[1024], const Scene *scene, const bke::BlenderProject *project, const RenderData *rd, bool preview, const char *suffix, ReportList *reports)
void RNA_def_function_output(FunctionRNA *, PropertyRNA *ret)
void ED_uvedit_get_aspect(Object *obedit, float *r_aspx, float *r_aspy)
void BKE_add_template_variables_general(bke::path_templates::VariableMap &variables, const ID *path_owner_id, const bke::BlenderProject *project)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void BKE_report_path_template_errors(ReportList *reports, eReportType report_type, StringRef path, Span< bke::path_templates::Error > errors)
const char * BKE_scene_multiview_view_suffix_get(const RenderData *rd, const char *viewname)
Vector< bke::path_templates::Error > BKE_image_path_from_imformat(char *filepath, const char *base, const char *relbase, const bke::path_templates::VariableMap *template_variables, int frame, const ImageFormatData *im_format, bool use_ext, bool use_frames, const char *suffix)
auto BKE_blender_project_read_callback(const Main *bmain, Fn lambda)
bool EDBM_uv_check(const Mesh *mesh)
void BKE_scene_frame_set(Scene *scene, float frame)
PropertyRNA * RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identifier, const int len, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void BKE_add_template_variables_for_render_path(bke::path_templates::VariableMap &variables, const Scene &scene)
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_api_scene_render(StructRNA *srna)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void unit_m4(float m[4][4])
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier_c_str, const char *call)
MINLINE void zero_v3(float r[3])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
bool BKE_imtype_is_movie(char imtype)
void RNA_def_function_flag(FunctionRNA *func, FunctionFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
T * DEG_get_original(T *id)
void BKE_screen_view3d_scene_sync(bScreen *screen, Scene *scene)
bool BKE_scene_camera_switch_update(Scene *scene)
void RNA_api_scene(StructRNA *srna)
Depsgraph * BKE_scene_ensure_depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_float_matrix(StructOrFunctionRNA *cont_, const char *identifier, const int rows, const int columns, const float *default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)