43static void rna_Scene_frame_set(
Scene *scene,
Main *bmain,
int frame,
float subframe)
45 double cfra = double(frame) + double(subframe);
55 view_layer !=
nullptr;
56 view_layer = view_layer->
next)
68 screen =
static_cast<bScreen *
>(screen->id.next))
76 if (!
G.is_rendering) {
86static void rna_Scene_uvedit_aspect(
Scene * ,
Object *ob,
float aspect[2])
97 aspect[0] = aspect[1] = 1.0f;
100static void rna_SceneRender_get_frame_path(
RenderData *rd,
129 (frame == INT_MIN) ? rd->
cfra : frame,
141static void rna_Scene_ray_cast(
Scene *scene,
143 const float origin[3],
144 const float direction[3],
153 float direction_unit[3];
172 (
float(*)[4])r_obmat);
176 if (r_ob !=
nullptr && *r_ob !=
nullptr) {
192static void rna_Scene_sequencer_editing_free(
Scene *scene)
199static void rna_Scene_alembic_export(
Scene *scene,
201 const char *filepath,
213 bool flatten_hierarchy,
214 bool visible_objects_only,
216 bool use_subdiv_schema,
218 bool export_particles,
232 params.frame_start = frame_start;
233 params.frame_end = frame_end;
235 params.frame_samples_xform = xform_samples;
236 params.frame_samples_shape = geom_samples;
238 params.shutter_open = shutter_open;
239 params.shutter_close = shutter_close;
241 params.selected_only = selected_only;
245 params.apply_subdiv = apply_subdiv;
246 params.flatten_hierarchy = flatten_hierarchy;
247 params.visible_objects_only = visible_objects_only;
248 params.face_sets = face_sets;
249 params.use_subdiv_schema = use_subdiv_schema;
250 params.export_hair = export_hair;
251 params.export_particles = export_particles;
254 params.quad_method = quad_method;
255 params.ngon_method = ngon_method;
277 func,
"Set scene frame updating all objects and view layers immediately");
282 func,
"subframe", 0.0, 0.0, 1.0,
"",
"Subframe time, between 0.0 and 1.0", 0.0, 1.0);
290 func,
"result", 2,
nullptr, 0.0f,
FLT_MAX,
"",
"aspect", 0.0f,
FLT_MAX);
298 parm =
RNA_def_pointer(func,
"depsgraph",
"Depsgraph",
"",
"The current dependency graph");
324 "The hit location of this ray cast",
336 "The face normal at the ray cast hit location",
342 func,
"index", 0, 0, 0,
"",
"The face index, -1 when original data isn't available", 0, 0);
344 parm =
RNA_def_pointer(func,
"object",
"Object",
"",
"Ray cast object");
346 parm =
RNA_def_float_matrix(func,
"matrix", 4, 4,
nullptr, 0.0f, 0.0f,
"",
"Matrix", 0.0f, 0.0f);
350 func =
RNA_def_function(srna,
"sequence_editor_create",
"blender::seq::editing_ensure");
353 func,
"sequence_editor",
"SequenceEditor",
"",
"New sequence editor data or nullptr");
356 func =
RNA_def_function(srna,
"sequence_editor_clear",
"rna_Scene_sequencer_editing_free");
361 func =
RNA_def_function(srna,
"alembic_export",
"rna_Scene_alembic_export");
363 func,
"Export to Alembic file (deprecated, use the Alembic export operator)");
366 func,
"filepath",
nullptr,
FILE_MAX,
"File Path",
"File path to write Alembic file");
370 RNA_def_int(func,
"frame_start", 1, INT_MIN, INT_MAX,
"Start",
"Start Frame", INT_MIN, INT_MAX);
371 RNA_def_int(func,
"frame_end", 1, INT_MIN, INT_MAX,
"End",
"End Frame", INT_MIN, INT_MAX);
373 func,
"xform_samples", 1, 1, 128,
"Xform samples",
"Transform samples per frame", 1, 128);
375 func,
"geom_samples", 1, 1, 128,
"Geom samples",
"Geometry samples per frame", 1, 128);
376 RNA_def_float(func,
"shutter_open", 0.0f, -1.0f, 1.0f,
"Shutter open",
"", -1.0f, 1.0f);
377 RNA_def_float(func,
"shutter_close", 1.0f, -1.0f, 1.0f,
"Shutter close",
"", -1.0f, 1.0f);
378 RNA_def_boolean(func,
"selected_only",
false,
"Selected only",
"Export only selected objects");
381 RNA_def_boolean(func,
"vcolors",
false,
"Color Attributes",
"Export color attributes");
383 func,
"apply_subdiv",
true,
"Subsurfs as meshes",
"Export subdivision surfaces as meshes");
384 RNA_def_boolean(func,
"flatten",
false,
"Flatten hierarchy",
"Flatten hierarchy");
386 "visible_objects_only",
388 "Visible layers only",
389 "Export only objects in visible layers");
390 RNA_def_boolean(func,
"face_sets",
false,
"Facesets",
"Export face sets");
394 "Use Alembic subdivision Schema",
395 "Use Alembic subdivision Schema");
400 "Exports hair particle systems as animated curves");
402 func,
"export_particles",
true,
"Export Particles",
"Exports non-hair particle systems");
404 func,
"packuv",
false,
"Export with packed UV islands",
"Export with packed UV islands");
412 "Value by which to enlarge or shrink the objects with respect to the world's origin",
419 "Export polygons (quads and n-gons) as triangles");
425 "Method for splitting the quads into triangles");
431 "Method for splitting the n-gons into triangles");
442 func =
RNA_def_function(srna,
"frame_path",
"rna_SceneRender_get_frame_path");
445 func,
"Return the absolute path to the filename to be written for a given frame");
452 "Frame number to use, if unset the current frame will be used",
455 RNA_def_boolean(func,
"preview",
false,
"Preview",
"Use preview range");
461 "The name of the view to use to replace the \"%\" chars");
467 "The resulting filepath from the scenes render settings");
bool ABC_export(struct Scene *scene, struct bContext *C, const char *filepath, const struct AlembicExportParams *params, bool as_background_job)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
void BKE_report_path_template_errors(ReportList *reports, eReportType report_type, blender::StringRef path, blender::Span< blender::bke::path_templates::Error > errors)
blender::bke::path_templates::VariableMap BKE_build_template_variables_for_render_path(const RenderData *render_data)
void BKE_scene_frame_set(Scene *scene, float frame)
const char * BKE_scene_multiview_view_suffix_get(const RenderData *rd, const char *viewname)
bool BKE_scene_camera_switch_update(Scene *scene)
Depsgraph * BKE_scene_ensure_depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer)
void BKE_scene_graph_update_for_newframe(Depsgraph *depsgraph)
void BKE_screen_view3d_scene_sync(bScreen *screen, Scene *scene)
#define BVH_RAYCAST_DIST_MAX
void unit_m4(float m[4][4])
MINLINE float normalize_v3_v3(float r[3], const float a[3])
MINLINE void zero_v3(float r[3])
#define BPy_BEGIN_ALLOW_THREADS
#define BPy_END_ALLOW_THREADS
T * DEG_get_original(T *id)
bool EDBM_uv_check(BMEditMesh *em)
void ED_uvedit_get_aspect(Object *obedit, float *r_aspx, float *r_aspy)
BPy_StructRNA * depsgraph
static float normals[][3]
void MOV_filepath_from_settings(char filepath[1024], const RenderData *rd, bool preview, const char *suffix, ReportList *reports)
void triangulate(BMesh *bm)
MatBase< T, NumCol, NumRow > scale(const MatBase< T, NumCol, NumRow > &mat, const VectorT &scale)
void editing_free(Scene *scene, const bool do_id_user)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
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)
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)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_function_flag(FunctionRNA *func, int flag)
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)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_function_output(FunctionRNA *, PropertyRNA *ret)
void RNA_def_property_subtype(PropertyRNA *prop, PropertySubType subtype)
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)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
const EnumPropertyItem rna_enum_modifier_triangulate_ngon_method_items[]
const EnumPropertyItem rna_enum_modifier_triangulate_quad_method_items[]
void RNA_api_scene(StructRNA *srna)
void RNA_api_scene_render(StructRNA *srna)
struct ImageFormatData im_format
void WM_main_add_notifier(uint type, void *reference)