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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-08 10:28:52 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-13 15:38:59 +0300
commit7b9fb3259157cea2df5e7b461d04f55cfa380031 (patch)
treea54e7d066283aeae384beb2ae99cc9a0e158bec5 /source/blender/makesrna/intern/rna_object_api.c
parenta1e2415ed51e2da97e3b182f18f462345a02ce14 (diff)
Python API: remove preview/render resolution settings from API functions.
For correct results these must have been set already when the depsgraph was created and evaluated, so all dependencies have appropriate resolutions too. For particle we no longer backup and restore the viewport particles to avoid overwriting them during render, as copy-on-write solves this for us. Even without COW particles seem to work ok. This also removes the particle simplification options based on camera. This was never used much and only available in Blender Internal. Differential Revision: https://developer.blender.org/D3148
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 4e90c526e88..3b934b10d64 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -197,12 +197,12 @@ static void rna_Object_camera_fit_coords(
/* copied from Mesh_getFromObject and adapted to RNA interface */
/* settings: 0 - preview, 1 - render */
static Mesh *rna_Object_to_mesh(
- Object *ob, bContext *C, ReportList *reports, Scene *sce, ViewLayer *view_layer,
- int apply_modifiers, int settings, int calc_tessface, int calc_undeformed)
+ Object *ob, bContext *C, ReportList *reports, Depsgraph *depsgraph,
+ int apply_modifiers, int calc_tessface, int calc_undeformed)
{
Main *bmain = CTX_data_main(C);
- return rna_Main_meshes_new_from_object(bmain, reports, sce, view_layer, ob, apply_modifiers, settings, calc_tessface, calc_undeformed);
+ return rna_Main_meshes_new_from_object(bmain, reports, depsgraph, ob, apply_modifiers, calc_tessface, calc_undeformed);
}
static PointerRNA rna_Object_shape_key_add(Object *ob, bContext *C, ReportList *reports,
@@ -547,14 +547,10 @@ void RNA_api_object(StructRNA *srna)
func = RNA_def_function(srna, "to_mesh", "rna_Object_to_mesh");
RNA_def_function_ui_description(func, "Create a Mesh data-block with modifiers applied");
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_CONTEXT);
- parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate modifiers");
- RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
- parm = RNA_def_pointer(func, "view_layer", "ViewLayer", "", "Scene layer within which to evaluate modifiers");
+ parm = RNA_def_pointer(func, "depsgraph", "Depsgraph", "Dependency Graph", "Evaluated dependency graph within wich to evaluate modifiers");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
parm = RNA_def_boolean(func, "apply_modifiers", 0, "", "Apply modifiers");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
- parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply");
- RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
RNA_def_boolean(func, "calc_tessface", true, "Calculate Tessellation", "Calculate tessellation faces");
RNA_def_boolean(func, "calc_undeformed", false, "Calculate Undeformed", "Calculate undeformed vertex coordinates");
parm = RNA_def_pointer(func, "mesh", "Mesh", "",