2011-02-23 10:52:22 +00:00
/*
2009-08-25 04:05:37 +00:00
* * * * * * BEGIN GPL LICENSE BLOCK * * * * *
*
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation ; either version 2
2012-03-18 09:27:36 +00:00
* of the License , or ( at your option ) any later version .
2009-08-25 04:05:37 +00:00
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software Foundation ,
2010-02-12 13:34:04 +00:00
* Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 , USA .
2009-08-25 04:05:37 +00:00
*
* The Original Code is Copyright ( C ) 2009 Blender Foundation .
* All rights reserved .
*
2012-03-18 09:27:36 +00:00
*
2009-09-22 16:35:07 +00:00
* Contributor ( s ) : Joshua Leung , Arystanbek Dyussenov
2009-08-25 04:05:37 +00:00
*
* * * * * * END GPL LICENSE BLOCK * * * * *
*/
2011-02-27 20:20:01 +00:00
/** \file blender/makesrna/intern/rna_scene_api.c
* \ ingroup RNA
*/
2009-08-25 04:05:37 +00:00
# include <stdlib.h>
# include <stdio.h>
2013-03-04 18:36:37 +00:00
# include "BLI_utildefines.h"
2016-01-12 09:37:56 +01:00
# include "BLI_kdopbvh.h"
2012-09-03 22:04:14 +00:00
# include "BLI_path_util.h"
2009-08-25 04:05:37 +00:00
# include "RNA_define.h"
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
# include "RNA_enum_types.h"
2009-08-25 04:05:37 +00:00
# include "DNA_anim_types.h"
# include "DNA_object_types.h"
# include "DNA_scene_types.h"
2012-06-16 23:35:53 +00:00
2012-09-20 01:02:39 +00:00
# include "rna_internal.h" /* own include */
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
# ifdef WITH_ALEMBIC
# include ".. / .. / alembic / ABC_alembic.h"
# endif
2017-10-18 15:07:26 +11:00
const EnumPropertyItem rna_enum_abc_compression_items [ ] = {
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
# ifdef WITH_ALEMBIC
{ ABC_ARCHIVE_OGAWA , " OGAWA " , 0 , " Ogawa " , " " } ,
{ ABC_ARCHIVE_HDF5 , " HDF5 " , 0 , " HDF5 " , " " } ,
# endif
{ 0 , NULL , 0 , NULL , NULL }
} ;
2009-08-25 04:05:37 +00:00
# ifdef RNA_RUNTIME
# include "BKE_animsys.h"
2014-12-11 19:46:35 +01:00
# include "BKE_editmesh.h"
2010-08-01 12:47:49 +00:00
# include "BKE_global.h"
# include "BKE_image.h"
# include "BKE_scene.h"
2010-01-08 13:52:38 +00:00
# include "BKE_writeavi.h"
2009-08-25 04:05:37 +00:00
2013-04-11 09:57:26 +00:00
# include "ED_transform.h"
2016-05-06 04:49:21 +10:00
# include "ED_transform_snap_object_context.h"
2014-12-11 19:46:35 +01:00
# include "ED_uvedit.h"
2009-08-19 09:52:13 +00:00
2013-12-26 17:24:42 +06:00
# ifdef WITH_PYTHON
# include "BPY_extern.h"
# endif
2017-11-03 16:28:37 +01:00
static void rna_Scene_frame_set ( Scene * scene , Main * bmain , int frame , float subframe )
2009-07-11 11:58:50 +00:00
{
2013-06-16 04:06:38 +00:00
double cfra = ( double ) frame + ( double ) subframe ;
CLAMP ( cfra , MINAFRAME , MAXFRAME ) ;
BKE_scene_frame_set ( scene , cfra ) ;
2013-01-27 16:45:00 +00:00
2013-12-26 17:24:42 +06:00
# ifdef WITH_PYTHON
BPy_BEGIN_ALLOW_THREADS ;
# endif
2017-11-03 16:31:53 +01:00
BKE_scene_update_for_newframe ( bmain - > eval_ctx , bmain , scene ) ;
2013-12-26 17:24:42 +06:00
# ifdef WITH_PYTHON
BPy_END_ALLOW_THREADS ;
# endif
2012-05-05 14:33:36 +00:00
BKE_scene_camera_switch_update ( scene ) ;
2009-07-11 11:58:50 +00:00
2012-11-26 09:46:15 +00:00
/* don't do notifier when we're rendering, avoid some viewport crashes
* redrawing while the data is being modified for render */
2012-11-26 11:03:14 +00:00
if ( ! G . is_rendering ) {
2012-11-26 09:46:15 +00:00
/* cant use NC_SCENE|ND_FRAME because this causes wm_event_do_notifiers to call
* BKE_scene_update_for_newframe which will loose any un - keyed changes [ # 24690 ] */
/* WM_main_add_notifier(NC_SCENE|ND_FRAME, scene); */
/* instead just redraw the views */
WM_main_add_notifier ( NC_WINDOW , NULL ) ;
}
2009-11-24 09:24:32 +00:00
}
2014-12-11 19:46:35 +01:00
static void rna_Scene_uvedit_aspect ( Scene * scene , Object * ob , float * aspect )
{
2014-12-12 11:15:38 +01:00
if ( ( ob - > type = = OB_MESH ) & & ( ob - > mode = = OB_MODE_EDIT ) ) {
BMEditMesh * em ;
em = BKE_editmesh_from_object ( ob ) ;
2017-05-25 15:11:00 +10:00
if ( EDBM_uv_check ( em ) ) {
2014-12-12 11:15:38 +01:00
ED_uvedit_get_aspect ( scene , ob , em - > bm , aspect , aspect + 1 ) ;
return ;
}
2014-12-11 19:46:35 +01:00
}
2014-12-12 11:15:38 +01:00
aspect [ 0 ] = aspect [ 1 ] = 1.0f ;
2014-12-11 19:46:35 +01:00
}
2017-11-03 16:15:49 +01:00
static void rna_Scene_update_tagged ( Scene * scene , Main * bmain )
2010-08-01 12:47:49 +00:00
{
2013-12-26 17:24:42 +06:00
# ifdef WITH_PYTHON
BPy_BEGIN_ALLOW_THREADS ;
# endif
2017-11-03 16:15:49 +01:00
BKE_scene_update_tagged ( bmain - > eval_ctx , bmain , scene ) ;
2013-12-26 17:24:42 +06:00
# ifdef WITH_PYTHON
BPy_END_ALLOW_THREADS ;
# endif
2010-08-01 12:47:49 +00:00
}
2015-04-06 10:40:12 -03:00
static void rna_SceneRender_get_frame_path ( RenderData * rd , int frame , int preview , const char * view , char * name )
2010-01-08 13:52:38 +00:00
{
2015-04-08 11:53:14 +02:00
const char * suffix = BKE_scene_multiview_view_suffix_get ( rd , view ) ;
/* avoid NULL pointer */
if ( ! suffix )
suffix = " " ;
2015-01-24 16:48:23 +11:00
if ( BKE_imtype_is_movie ( rd - > im_format . imtype ) ) {
2015-04-08 11:53:14 +02:00
BKE_movie_filepath_get ( name , rd , preview ! = 0 , suffix ) ;
2015-01-24 16:48:23 +11:00
}
else {
BKE_image_path_from_imformat (
name , rd - > pic , G . main - > name , ( frame = = INT_MIN ) ? rd - > cfra : frame ,
2015-04-08 12:02:23 +02:00
& rd - > im_format , ( rd - > scemode & R_EXTENSION ) ! = 0 , true , suffix ) ;
2015-01-24 16:48:23 +11:00
}
2010-01-08 13:52:38 +00:00
}
2015-12-02 19:07:24 +11:00
static void rna_Scene_ray_cast (
2017-10-16 17:15:03 -02:00
Scene * scene , SceneLayer * scene_layer , const char * engine_id ,
float origin [ 3 ] , float direction [ 3 ] , float ray_dist ,
2015-12-02 19:07:24 +11:00
int * r_success , float r_location [ 3 ] , float r_normal [ 3 ] , int * r_index ,
Object * * r_ob , float r_obmat [ 16 ] )
2013-04-11 09:57:26 +00:00
{
2017-10-16 17:15:03 -02:00
RenderEngineType * engine ;
if ( engine_id = = NULL | | engine_id [ 0 ] = = ' \0 ' ) {
engine = RE_engines_find ( scene - > view_render . engine_id ) ;
}
else {
engine = RE_engines_find ( engine_id ) ;
}
2015-12-02 19:07:24 +11:00
normalize_v3 ( direction ) ;
2013-04-11 09:57:26 +00:00
2016-04-21 11:29:32 +10:00
SnapObjectContext * sctx = ED_transform_snap_object_context_create (
2017-10-16 17:15:03 -02:00
G . main , scene , scene_layer , engine , 0 ) ;
2016-04-21 11:29:32 +10:00
bool ret = ED_transform_snap_object_project_ray_ex (
2017-08-11 11:23:39 +10:00
sctx ,
2016-04-21 11:29:32 +10:00
& ( const struct SnapObjectParams ) {
. snap_select = SNAP_ALL ,
} ,
2015-12-02 19:07:24 +11:00
origin , direction , & ray_dist ,
2016-04-21 11:29:32 +10:00
r_location , r_normal , r_index ,
r_ob , ( float ( * ) [ 4 ] ) r_obmat ) ;
ED_transform_snap_object_context_destroy ( sctx ) ;
if ( ret ) {
2013-04-11 09:57:26 +00:00
* r_success = true ;
}
else {
2015-12-02 19:07:24 +11:00
* r_success = false ;
2013-04-24 17:49:13 +00:00
unit_m4 ( ( float ( * ) [ 4 ] ) r_obmat ) ;
2013-04-11 09:57:26 +00:00
zero_v3 ( r_location ) ;
zero_v3 ( r_normal ) ;
}
}
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
# ifdef WITH_ALEMBIC
static void rna_Scene_alembic_export (
Scene * scene ,
bContext * C ,
const char * filepath ,
int frame_start ,
int frame_end ,
int xform_samples ,
int geom_samples ,
float shutter_open ,
float shutter_close ,
int selected_only ,
int uvs ,
int normals ,
int vcolors ,
int apply_subdiv ,
int flatten_hierarchy ,
int visible_layers_only ,
int renderable_only ,
int face_sets ,
int use_subdiv_schema ,
2017-04-19 13:03:52 +02:00
int export_hair ,
int export_particles ,
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
int compression_type ,
int packuv ,
2016-09-09 05:30:43 +02:00
float scale ,
int triangulate ,
int quad_method ,
int ngon_method )
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
{
/* We have to enable allow_threads, because we may change scene frame number
* during export . */
# ifdef WITH_PYTHON
BPy_BEGIN_ALLOW_THREADS ;
# endif
const struct AlembicExportParams params = {
. frame_start = frame_start ,
. frame_end = frame_end ,
2017-05-30 13:39:36 +02:00
. frame_samples_xform = xform_samples ,
. frame_samples_shape = geom_samples ,
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
. shutter_open = shutter_open ,
. shutter_close = shutter_close ,
. selected_only = selected_only ,
. uvs = uvs ,
. normals = normals ,
. vcolors = vcolors ,
. apply_subdiv = apply_subdiv ,
. flatten_hierarchy = flatten_hierarchy ,
. visible_layers_only = visible_layers_only ,
. renderable_only = renderable_only ,
. face_sets = face_sets ,
. use_subdiv_schema = use_subdiv_schema ,
2017-04-19 13:03:52 +02:00
. export_hair = export_hair ,
. export_particles = export_particles ,
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
. compression_type = compression_type ,
. packuv = packuv ,
2017-03-12 02:40:04 +11:00
. triangulate = triangulate ,
. quad_method = quad_method ,
. ngon_method = ngon_method ,
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
. global_scale = scale ,
} ;
2017-04-19 14:40:57 +02:00
ABC_export ( scene , C , filepath , & params , true ) ;
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
# ifdef WITH_PYTHON
BPy_END_ALLOW_THREADS ;
# endif
}
# endif
2011-03-27 22:02:54 +00:00
# ifdef WITH_COLLADA
/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
# include "../../collada/collada.h"
2017-03-12 20:31:34 +01:00
/* Note: This definition must match to the generated function call */
2012-05-24 14:56:09 +00:00
static void rna_Scene_collada_export (
2012-11-03 15:35:03 +00:00
Scene * scene ,
2017-03-29 21:55:04 +02:00
bContext * C ,
2017-03-12 20:31:34 +01:00
const char * filepath ,
2012-11-03 15:35:03 +00:00
int apply_modifiers ,
2017-03-12 20:31:34 +01:00
int export_mesh_type ,
2012-11-03 15:35:03 +00:00
int selected ,
int include_children ,
int include_armatures ,
2013-01-21 13:45:49 +00:00
int include_shapekeys ,
2012-11-03 15:35:03 +00:00
int deform_bones_only ,
int active_uv_only ,
int include_material_textures ,
int use_texture_copies ,
2017-03-12 20:31:34 +01:00
int triangulate ,
2012-11-03 15:35:03 +00:00
int use_object_instantiation ,
2016-06-19 06:25:54 +10:00
int use_blender_profile ,
2012-11-03 15:35:03 +00:00
int sort_by_name ,
2017-03-12 20:31:34 +01:00
int export_transformation_type ,
2017-03-23 00:07:05 +01:00
int open_sim ,
2017-04-03 10:48:00 +02:00
int limit_precision ,
2017-03-23 00:07:05 +01:00
int keep_bind_info )
2011-03-27 22:02:54 +00:00
{
2017-07-21 11:53:13 +02:00
EvaluationContext eval_ctx ;
CTX_data_eval_ctx ( C , & eval_ctx ) ;
collada_export ( & eval_ctx ,
scene ,
2017-03-29 21:55:04 +02:00
CTX_data_scene_layer ( C ) ,
2017-03-23 00:07:05 +01:00
filepath ,
apply_modifiers ,
export_mesh_type ,
selected ,
include_children ,
include_armatures ,
include_shapekeys ,
deform_bones_only ,
active_uv_only ,
include_material_textures ,
use_texture_copies ,
triangulate ,
use_object_instantiation ,
use_blender_profile ,
sort_by_name ,
export_transformation_type ,
open_sim ,
2017-04-03 10:48:00 +02:00
limit_precision ,
2017-03-23 00:07:05 +01:00
keep_bind_info ) ;
2011-03-27 22:02:54 +00:00
}
# endif
2009-08-25 04:05:37 +00:00
# else
void RNA_api_scene ( StructRNA * srna )
{
FunctionRNA * func ;
PropertyRNA * parm ;
2009-06-24 19:23:34 +00:00
2012-03-05 23:30:41 +00:00
func = RNA_def_function ( srna , " frame_set " , " rna_Scene_frame_set " ) ;
2011-09-19 13:23:58 +00:00
RNA_def_function_ui_description ( func , " Set scene frame updating all objects immediately " ) ;
2012-03-05 23:30:41 +00:00
parm = RNA_def_int ( func , " frame " , 0 , MINAFRAME , MAXFRAME , " " , " Frame number to set " , MINAFRAME , MAXFRAME ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_parameter_flags ( parm , 0 , PARM_REQUIRED ) ;
2011-01-10 03:58:07 +00:00
RNA_def_float ( func , " subframe " , 0.0 , 0.0 , 1.0 , " " , " Sub-frame time, between 0.0 and 1.0 " , 0.0 , 1.0 ) ;
2017-11-03 16:28:37 +01:00
RNA_def_function_flag ( func , FUNC_USE_MAIN ) ;
2009-09-22 16:35:07 +00:00
2012-03-05 23:30:41 +00:00
func = RNA_def_function ( srna , " update " , " rna_Scene_update_tagged " ) ;
2012-03-18 09:27:36 +00:00
RNA_def_function_ui_description ( func ,
" Update data tagged to be updated from previous access to data or operators " ) ;
2017-11-03 16:15:49 +01:00
RNA_def_function_flag ( func , FUNC_USE_MAIN ) ;
2011-03-27 22:02:54 +00:00
2014-12-11 19:46:35 +01:00
func = RNA_def_function ( srna , " uvedit_aspect " , " rna_Scene_uvedit_aspect " ) ;
RNA_def_function_ui_description ( func , " Get uv aspect for current object " ) ;
parm = RNA_def_pointer ( func , " object " , " Object " , " " , " Object " ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_parameter_flags ( parm , PROP_NEVER_NULL , PARM_REQUIRED ) ;
2014-12-12 11:15:38 +01:00
parm = RNA_def_float_vector ( func , " result " , 2 , NULL , 0.0f , FLT_MAX , " " , " aspect " , 0.0f , FLT_MAX ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_parameter_flags ( parm , PROP_THICK_WRAP , 0 ) ;
2014-12-11 19:46:35 +01:00
RNA_def_function_output ( func , parm ) ;
2013-04-11 09:57:26 +00:00
/* Ray Cast */
func = RNA_def_function ( srna , " ray_cast " , " rna_Scene_ray_cast " ) ;
RNA_def_function_ui_description ( func , " Cast a ray onto in object space " ) ;
2017-04-11 15:14:49 +02:00
parm = RNA_def_pointer ( func , " scene_layer " , " SceneLayer " , " " , " Scene Layer " ) ;
RNA_def_parameter_flags ( parm , PROP_NEVER_NULL , PARM_REQUIRED ) ;
2017-10-16 17:15:03 -02:00
parm = RNA_def_string ( func , " engine " , NULL , MAX_NAME , " Engine " , " Render engine, use scene one by default " ) ;
2013-04-11 09:57:26 +00:00
/* ray start and end */
2015-12-02 19:07:24 +11:00
parm = RNA_def_float_vector ( func , " origin " , 3 , NULL , - FLT_MAX , FLT_MAX , " " , " " , - 1e4 , 1e4 ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_parameter_flags ( parm , 0 , PARM_REQUIRED ) ;
2015-12-02 19:07:24 +11:00
parm = RNA_def_float_vector ( func , " direction " , 3 , NULL , - FLT_MAX , FLT_MAX , " " , " " , - 1e4 , 1e4 ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_parameter_flags ( parm , 0 , PARM_REQUIRED ) ;
2016-01-12 09:37:56 +01:00
RNA_def_float ( func , " distance " , BVH_RAYCAST_DIST_MAX , 0.0 , BVH_RAYCAST_DIST_MAX ,
" " , " Maximum distance " , 0.0 , BVH_RAYCAST_DIST_MAX ) ;
2013-04-11 09:57:26 +00:00
/* return location and normal */
2013-04-24 17:49:13 +00:00
parm = RNA_def_boolean ( func , " result " , 0 , " " , " " ) ;
RNA_def_function_output ( func , parm ) ;
2013-04-11 09:57:26 +00:00
parm = RNA_def_float_vector ( func , " location " , 3 , NULL , - FLT_MAX , FLT_MAX , " Location " ,
" The hit location of this ray cast " , - 1e4 , 1e4 ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_parameter_flags ( parm , PROP_THICK_WRAP , 0 ) ;
2013-04-11 09:57:26 +00:00
RNA_def_function_output ( func , parm ) ;
parm = RNA_def_float_vector ( func , " normal " , 3 , NULL , - FLT_MAX , FLT_MAX , " Normal " ,
" The face normal at the ray cast hit location " , - 1e4 , 1e4 ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_parameter_flags ( parm , PROP_THICK_WRAP , 0 ) ;
2013-04-11 09:57:26 +00:00
RNA_def_function_output ( func , parm ) ;
2015-12-02 19:07:24 +11:00
parm = RNA_def_int ( func , " index " , 0 , 0 , 0 , " " , " The face index, -1 when original data isn't available " , 0 , 0 ) ;
RNA_def_function_output ( func , parm ) ;
parm = RNA_def_pointer ( func , " object " , " Object " , " " , " Ray cast object " ) ;
RNA_def_function_output ( func , parm ) ;
parm = RNA_def_float_matrix ( func , " matrix " , 4 , 4 , NULL , 0.0f , 0.0f , " " , " Matrix " , 0.0f , 0.0f ) ;
RNA_def_function_output ( func , parm ) ;
2013-04-11 09:57:26 +00:00
2011-03-27 22:02:54 +00:00
# ifdef WITH_COLLADA
/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
2012-03-05 23:30:41 +00:00
func = RNA_def_function ( srna , " collada_export " , " rna_Scene_collada_export " ) ;
2014-01-16 21:43:22 +11:00
parm = RNA_def_string ( func , " filepath " , NULL , FILE_MAX , " File Path " , " File path to write Collada file " ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_parameter_flags ( parm , 0 , PARM_REQUIRED ) ;
2011-03-27 22:02:54 +00:00
RNA_def_property_subtype ( parm , PROP_FILEPATH ) ; /* allow non utf8 */
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " apply_modifiers " , false ,
" Apply Modifiers " , " Apply modifiers to exported mesh (non destructive)) " ) ;
2017-03-12 20:31:34 +01:00
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_int ( func , " export_mesh_type " , 0 , INT_MIN , INT_MAX ,
2017-03-24 19:59:14 +01:00
" Resolution " , " Modifier resolution for export " , INT_MIN , INT_MAX ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " selected " , false , " Selection Only " , " Export only selected elements " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " include_children " , false ,
" Include Children " , " Export all children of selected objects (even if not selected) " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " include_armatures " , false ,
" Include Armatures " , " Export related armatures (even if not selected) " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " include_shapekeys " , true , " Include Shape Keys " , " Export all Shape Keys from Mesh Objects " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " deform_bones_only " , false ,
" Deform Bones only " , " Only export deforming bones with armatures " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " active_uv_only " , false , " Only Selected UV Map " , " Export only the selected UV Map " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " include_material_textures " , false ,
" Include Material Textures " , " Export textures assigned to the object Materials " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " use_texture_copies " , true ,
" Copy " , " Copy textures to same folder where the .dae file is exported " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " triangulate " , true , " Triangulate " , " Export Polygons (Quads & NGons) as Triangles " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " use_object_instantiation " , true ,
" Use Object Instances " , " Instantiate multiple Objects from same Data " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " use_blender_profile " , true , " Use Blender Profile " ,
" Export additional Blender specific information (for material, shaders, bones, etc.) " ) ;
2017-03-12 20:31:34 +01:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " sort_by_name " , false , " Sort by Object name " , " Sort exported data by Object name " ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_int ( func , " export_transformation_type " , 0 , INT_MIN , INT_MAX ,
2017-03-24 19:59:14 +01:00
" Transform " , " Transformation type for translation, scale and rotation " , INT_MIN , INT_MAX ) ;
2013-03-06 23:21:52 +00:00
2017-03-24 19:59:14 +01:00
RNA_def_boolean ( func , " open_sim " , false ,
" Export to SL/OpenSim " , " Compatibility mode for SL, OpenSim and other compatible online worlds " ) ;
2017-03-23 00:07:05 +01:00
2017-04-03 10:48:00 +02:00
RNA_def_boolean ( func , " limit_precision " , false ,
" Limit Precision " ,
" Reduce the precision of the exported data to 6 digits " ) ;
RNA_def_boolean ( func , " keep_bind_info " , false ,
" Keep Bind Info " ,
2017-03-24 19:59:14 +01:00
" Store bind pose information in custom bone properties for later use during Collada export " ) ;
2017-03-23 00:07:05 +01:00
2017-03-29 21:55:04 +02:00
RNA_def_function_flag ( func , FUNC_USE_CONTEXT ) ;
2011-03-27 22:02:54 +00:00
# endif
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
# ifdef WITH_ALEMBIC
2017-04-19 14:40:57 +02:00
/* XXX Deprecated, will be removed in 2.8 in favour of calling the export operator. */
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
func = RNA_def_function ( srna , " alembic_export " , " rna_Scene_alembic_export " ) ;
2017-04-19 14:40:57 +02:00
RNA_def_function_ui_description ( func , " Export to Alembic file (deprecated, use the Alembic export operator) " ) ;
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
parm = RNA_def_string ( func , " filepath " , NULL , FILE_MAX , " File Path " , " File path to write Alembic file " ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_parameter_flags ( parm , 0 , PARM_REQUIRED ) ;
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
RNA_def_property_subtype ( parm , PROP_FILEPATH ) ; /* allow non utf8 */
RNA_def_int ( func , " frame_start " , 1 , INT_MIN , INT_MAX , " Start " , " Start Frame " , INT_MIN , INT_MAX ) ;
RNA_def_int ( func , " frame_end " , 1 , INT_MIN , INT_MAX , " End " , " End Frame " , INT_MIN , INT_MAX ) ;
RNA_def_int ( func , " xform_samples " , 1 , 1 , 128 , " Xform samples " , " Transform samples per frame " , 1 , 128 ) ;
RNA_def_int ( func , " geom_samples " , 1 , 1 , 128 , " Geom samples " , " Geometry samples per frame " , 1 , 128 ) ;
RNA_def_float ( func , " shutter_open " , 0.0f , - 1.0f , 1.0f , " Shutter open " , " " , - 1.0f , 1.0f ) ;
RNA_def_float ( func , " shutter_close " , 1.0f , - 1.0f , 1.0f , " Shutter close " , " " , - 1.0f , 1.0f ) ;
RNA_def_boolean ( func , " selected_only " , 0 , " Selected only " , " Export only selected objects " ) ;
RNA_def_boolean ( func , " uvs " , 1 , " UVs " , " Export UVs " ) ;
RNA_def_boolean ( func , " normals " , 1 , " Normals " , " Export cormals " ) ;
RNA_def_boolean ( func , " vcolors " , 0 , " Vertex colors " , " Export vertex colors " ) ;
RNA_def_boolean ( func , " apply_subdiv " , 1 , " Subsurfs as meshes " , " Export subdivision surfaces as meshes " ) ;
RNA_def_boolean ( func , " flatten " , 0 , " Flatten hierarchy " , " Flatten hierarchy " ) ;
RNA_def_boolean ( func , " visible_layers_only " , 0 , " Visible layers only " , " Export only objects in visible layers " ) ;
RNA_def_boolean ( func , " renderable_only " , 0 , " Renderable objects only " , " Export only objects marked renderable in the outliner " ) ;
RNA_def_boolean ( func , " face_sets " , 0 , " Facesets " , " Export face sets " ) ;
RNA_def_boolean ( func , " subdiv_schema " , 0 , " Use Alembic subdivision Schema " , " Use Alembic subdivision Schema " ) ;
2017-04-19 13:03:52 +02:00
RNA_def_boolean ( func , " export_hair " , 1 , " Export Hair " , " Exports hair particle systems as animated curves " ) ;
RNA_def_boolean ( func , " export_particles " , 1 , " Export Particles " , " Exports non-hair particle systems " ) ;
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
RNA_def_enum ( func , " compression_type " , rna_enum_abc_compression_items , 0 , " Compression " , " " ) ;
RNA_def_boolean ( func , " packuv " , 0 , " Export with packed UV islands " , " Export with packed UV islands " ) ;
RNA_def_float ( func , " scale " , 1.0f , 0.0001f , 1000.0f , " Scale " , " Value by which to enlarge or shrink the objects with respect to the world's origin " , 0.0001f , 1000.0f ) ;
2016-09-09 05:30:43 +02:00
RNA_def_boolean ( func , " triangulate " , 0 , " Triangulate " , " Export Polygons (Quads & NGons) as Triangles " ) ;
RNA_def_enum ( func , " quad_method " , rna_enum_modifier_triangulate_quad_method_items , 0 , " Quad Method " , " Method for splitting the quads into triangles " ) ;
RNA_def_enum ( func , " ngon_method " , rna_enum_modifier_triangulate_quad_method_items , 0 , " Polygon Method " , " Method for splitting the polygons into triangles " ) ;
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
RNA_def_function_flag ( func , FUNC_USE_CONTEXT ) ;
# endif
2009-08-25 04:05:37 +00:00
}
2011-03-27 22:02:54 +00:00
2010-01-08 13:52:38 +00:00
void RNA_api_scene_render ( StructRNA * srna )
{
FunctionRNA * func ;
PropertyRNA * parm ;
2012-03-05 23:30:41 +00:00
func = RNA_def_function ( srna , " frame_path " , " rna_SceneRender_get_frame_path " ) ;
2011-09-19 13:23:58 +00:00
RNA_def_function_ui_description ( func , " Return the absolute path to the filename to be written for a given frame " ) ;
RNA_def_int ( func , " frame " , INT_MIN , INT_MIN , INT_MAX , " " ,
" Frame number to use, if unset the current frame will be used " , MINAFRAME , MAXFRAME ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_boolean ( func , " preview " , 0 , " Preview " , " Use preview range " ) ;
RNA_def_string_file_path ( func , " view " , NULL , FILE_MAX , " View " ,
2015-04-06 10:40:12 -03:00
" The name of the view to use to replace the \" % \" chars " ) ;
2014-01-16 21:43:22 +11:00
parm = RNA_def_string_file_path ( func , " filepath " , NULL , FILE_MAX , " File Path " ,
2012-05-12 11:01:29 +00:00
" The resulting filepath from the scenes render settings " ) ;
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
RNA_def_parameter_flags ( parm , PROP_THICK_WRAP , 0 ) ; /* needed for string return value */
2010-01-24 10:51:59 +00:00
RNA_def_function_output ( func , parm ) ;
2010-01-08 13:52:38 +00:00
}
2009-08-25 04:05:37 +00:00
# endif