2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2008-10-31 23:50:02 +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
|
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* 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.
|
2008-10-31 23:50:02 +00:00
|
|
|
*
|
|
|
|
|
* Contributor(s): Blender Foundation (2008).
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
2011-02-27 20:20:01 +00:00
|
|
|
/** \file blender/makesrna/intern/rna_scene.c
|
|
|
|
|
* \ingroup RNA
|
|
|
|
|
*/
|
|
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
2012-01-12 17:22:32 +00:00
|
|
|
#include "DNA_brush_types.h"
|
2010-01-25 11:39:56 +00:00
|
|
|
#include "DNA_group_types.h"
|
|
|
|
|
#include "DNA_modifier_types.h"
|
2010-06-01 17:05:56 +00:00
|
|
|
#include "DNA_particle_types.h"
|
2013-01-23 05:56:22 +00:00
|
|
|
#include "DNA_rigidbody_types.h"
|
2008-10-31 23:50:02 +00:00
|
|
|
#include "DNA_scene_types.h"
|
2013-03-23 03:00:37 +00:00
|
|
|
#include "DNA_linestyle_types.h"
|
2009-08-16 16:15:13 +00:00
|
|
|
#include "DNA_userdef_types.h"
|
2012-08-01 17:19:32 +00:00
|
|
|
#include "DNA_world_types.h"
|
2012-04-13 20:25:05 +00:00
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
#include "IMB_imbuf_types.h"
|
|
|
|
|
|
2010-07-09 22:16:52 +00:00
|
|
|
#include "BLI_math.h"
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2015-08-16 17:32:01 +10:00
|
|
|
#include "BLT_translation.h"
|
2012-04-13 20:25:05 +00:00
|
|
|
|
2013-04-13 20:31:52 +00:00
|
|
|
#include "BKE_editmesh.h"
|
2013-04-22 22:20:38 +00:00
|
|
|
#include "BKE_paint.h"
|
2010-01-05 22:33:41 +00:00
|
|
|
|
2015-03-30 12:47:37 +02:00
|
|
|
#include "GPU_extensions.h"
|
|
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
#include "RNA_define.h"
|
|
|
|
|
#include "RNA_enum_types.h"
|
|
|
|
|
|
|
|
|
|
#include "rna_internal.h"
|
|
|
|
|
|
2009-08-26 15:13:58 +00:00
|
|
|
/* Include for Bake Options */
|
2011-11-02 18:20:53 +00:00
|
|
|
#include "RE_engine.h"
|
2009-08-26 15:13:58 +00:00
|
|
|
#include "RE_pipeline.h"
|
|
|
|
|
|
2009-11-20 10:37:50 +00:00
|
|
|
#ifdef WITH_QUICKTIME
|
2014-01-28 14:34:52 +06:00
|
|
|
# include "quicktime_export.h"
|
2015-06-16 10:03:35 +02:00
|
|
|
# include AUD_TYPES_H
|
2009-11-20 10:37:50 +00:00
|
|
|
#endif
|
|
|
|
|
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
#ifdef WITH_FFMPEG
|
2014-01-28 14:34:52 +06:00
|
|
|
# include "BKE_writeffmpeg.h"
|
|
|
|
|
# include <libavcodec/avcodec.h>
|
|
|
|
|
# include <libavformat/avformat.h>
|
|
|
|
|
# include "ffmpeg_compat.h"
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
#endif
|
2009-06-10 20:50:23 +00:00
|
|
|
|
2011-11-02 18:20:53 +00:00
|
|
|
#include "ED_render.h"
|
|
|
|
|
|
2011-03-27 23:11:22 +00:00
|
|
|
#include "WM_api.h"
|
2009-01-01 20:44:40 +00:00
|
|
|
#include "WM_types.h"
|
|
|
|
|
|
2010-01-28 19:21:15 +00:00
|
|
|
#include "BLI_threads.h"
|
2009-10-12 22:33:32 +00:00
|
|
|
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
#ifdef WITH_OPENEXR
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_exr_codec_items[] = {
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
{R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""},
|
|
|
|
|
{R_IMF_EXR_CODEC_PXR24, "PXR24", 0, "Pxr24 (lossy)", ""},
|
|
|
|
|
{R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""},
|
|
|
|
|
{R_IMF_EXR_CODEC_PIZ, "PIZ", 0, "PIZ (lossless)", ""},
|
|
|
|
|
{R_IMF_EXR_CODEC_RLE, "RLE", 0, "RLE (lossless)", ""},
|
2015-03-12 14:02:33 +01:00
|
|
|
{R_IMF_EXR_CODEC_ZIPS, "ZIPS", 0, "ZIPS (lossless)", ""},
|
|
|
|
|
{R_IMF_EXR_CODEC_B44, "B44", 0, "B44 (lossy)", ""},
|
|
|
|
|
{R_IMF_EXR_CODEC_B44A, "B44A", 0, "B44A (lossy)", ""},
|
|
|
|
|
{R_IMF_EXR_CODEC_DWAA, "DWAA", 0, "DWAA (lossy)", ""},
|
|
|
|
|
{R_IMF_EXR_CODEC_DWAB, "DWAB", 0, "DWAB (lossy)", ""},
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-01-17 16:31:13 +00:00
|
|
|
EnumPropertyItem uv_sculpt_relaxation_items[] = {
|
|
|
|
|
{UV_SCULPT_TOOL_RELAX_LAPLACIAN, "LAPLACIAN", 0, "Laplacian", "Use Laplacian method for relaxation"},
|
|
|
|
|
{UV_SCULPT_TOOL_RELAX_HC, "HC", 0, "HC", "Use HC method for relaxation"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-17 16:31:13 +00:00
|
|
|
|
|
|
|
|
EnumPropertyItem uv_sculpt_tool_items[] = {
|
|
|
|
|
{UV_SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", "Pinch UVs"},
|
|
|
|
|
{UV_SCULPT_TOOL_RELAX, "RELAX", 0, "Relax", "Relax UVs"},
|
|
|
|
|
{UV_SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", "Grab UVs"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-17 16:31:13 +00:00
|
|
|
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_snap_target_items[] = {
|
2010-02-11 01:11:52 +00:00
|
|
|
{SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target"},
|
|
|
|
|
{SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap center onto target"},
|
|
|
|
|
{SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target"},
|
|
|
|
|
{SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-10-12 22:33:32 +00:00
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_proportional_falloff_items[] = {
|
2011-05-15 17:59:48 +00:00
|
|
|
{PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"},
|
|
|
|
|
{PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"},
|
|
|
|
|
{PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"},
|
2015-02-04 05:35:09 +11:00
|
|
|
{PROP_INVSQUARE, "INVERSE_SQUARE", ICON_ROOTCURVE, "Inverse Square", "Inverse Square falloff"},
|
2011-05-15 17:59:48 +00:00
|
|
|
{PROP_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", "Sharp falloff"},
|
|
|
|
|
{PROP_LIN, "LINEAR", ICON_LINCURVE, "Linear", "Linear falloff"},
|
2011-11-07 19:25:13 +00:00
|
|
|
{PROP_CONST, "CONSTANT", ICON_NOCURVE, "Constant", "Constant falloff"},
|
2011-05-15 17:59:48 +00:00
|
|
|
{PROP_RANDOM, "RANDOM", ICON_RNDCURVE, "Random", "Random falloff"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-03-07 10:26:29 +00:00
|
|
|
|
2012-06-21 07:45:41 +00:00
|
|
|
/* subset of the enum - only curves, missing random and const */
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[] = {
|
2012-06-21 07:45:41 +00:00
|
|
|
{PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"},
|
|
|
|
|
{PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"},
|
|
|
|
|
{PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"},
|
2015-04-26 18:31:54 +10:00
|
|
|
{PROP_INVSQUARE, "INVERSE_SQUARE", ICON_ROOTCURVE, "Inverse Square", "Inverse Square falloff"},
|
2012-06-21 07:45:41 +00:00
|
|
|
{PROP_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", "Sharp falloff"},
|
|
|
|
|
{PROP_LIN, "LINEAR", ICON_LINCURVE, "Linear", "Linear falloff"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2009-10-13 16:08:02 +00:00
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_proportional_editing_items[] = {
|
2011-04-02 16:29:33 +00:00
|
|
|
{PROP_EDIT_OFF, "DISABLED", ICON_PROP_OFF, "Disable", "Proportional Editing disabled"},
|
|
|
|
|
{PROP_EDIT_ON, "ENABLED", ICON_PROP_ON, "Enable", "Proportional Editing enabled"},
|
2013-06-20 13:24:07 +00:00
|
|
|
{PROP_EDIT_PROJECTED, "PROJECTED", ICON_PROP_ON, "Projected (2D)",
|
|
|
|
|
"Proportional Editing using screen space locations"},
|
2012-12-24 17:40:47 +00:00
|
|
|
{PROP_EDIT_CONNECTED, "CONNECTED", ICON_PROP_CON, "Connected",
|
|
|
|
|
"Proportional Editing using connected geometry only"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-10-13 16:08:02 +00:00
|
|
|
|
2009-12-22 16:11:11 +00:00
|
|
|
/* keep for operators, not used here */
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_mesh_select_mode_items[] = {
|
2010-02-11 01:11:52 +00:00
|
|
|
{SCE_SELECT_VERTEX, "VERTEX", ICON_VERTEXSEL, "Vertex", "Vertex selection mode"},
|
|
|
|
|
{SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode"},
|
|
|
|
|
{SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-11-26 19:29:57 +00:00
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_snap_element_items[] = {
|
2015-09-05 23:02:54 +02:00
|
|
|
{SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"},
|
2010-02-11 01:11:52 +00:00
|
|
|
{SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"},
|
|
|
|
|
{SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges"},
|
|
|
|
|
{SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces"},
|
|
|
|
|
{SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-10-13 16:08:02 +00:00
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_snap_node_element_items[] = {
|
2015-09-05 23:02:54 +02:00
|
|
|
{SCE_SNAP_MODE_GRID, "GRID", ICON_SNAP_GRID, "Grid", "Snap to grid"},
|
2012-06-29 14:34:46 +00:00
|
|
|
{SCE_SNAP_MODE_NODE_X, "NODE_X", ICON_SNAP_EDGE, "Node X", "Snap to left/right node border"},
|
|
|
|
|
{SCE_SNAP_MODE_NODE_Y, "NODE_Y", ICON_SNAP_EDGE, "Node Y", "Snap to top/bottom node border"},
|
|
|
|
|
{SCE_SNAP_MODE_NODE_XY, "NODE_XY", ICON_SNAP_EDGE, "Node X / Y", "Snap to any node border"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2012-12-03 12:03:16 +00:00
|
|
|
EnumPropertyItem snap_uv_element_items[] = {
|
|
|
|
|
{SCE_SNAP_MODE_INCREMENT, "INCREMENT", ICON_SNAP_INCREMENT, "Increment", "Snap to increments of grid"},
|
|
|
|
|
{SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-07-26 17:41:09 +00:00
|
|
|
/* workaround for duplicate enums,
|
2013-10-31 14:10:01 +00:00
|
|
|
* have each enum line as a define then conditionally set it or not
|
2011-11-23 17:14:29 +00:00
|
|
|
*/
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2011-11-23 17:14:29 +00:00
|
|
|
#define R_IMF_ENUM_BMP {R_IMF_IMTYPE_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"},
|
2012-03-18 09:27:36 +00:00
|
|
|
#define R_IMF_ENUM_IRIS {R_IMF_IMTYPE_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", \
|
|
|
|
|
"Output image in (old!) SGI IRIS format"},
|
2011-11-23 17:14:29 +00:00
|
|
|
#define R_IMF_ENUM_PNG {R_IMF_IMTYPE_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"},
|
|
|
|
|
#define R_IMF_ENUM_JPEG {R_IMF_IMTYPE_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"},
|
|
|
|
|
#define R_IMF_ENUM_TAGA {R_IMF_IMTYPE_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"},
|
2012-03-18 09:27:36 +00:00
|
|
|
#define R_IMF_ENUM_TAGA_RAW {R_IMF_IMTYPE_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", \
|
|
|
|
|
"Output image in uncompressed Targa format"},
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-09-23 18:50:56 +00:00
|
|
|
#if 0 /* UNUSED (so far) */
|
2011-05-07 20:53:49 +00:00
|
|
|
#ifdef WITH_DDS
|
2011-11-23 17:14:29 +00:00
|
|
|
# define R_IMF_ENUM_DDS {R_IMF_IMTYPE_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"},
|
|
|
|
|
#else
|
|
|
|
|
# define R_IMF_ENUM_DDS
|
2011-05-07 20:53:49 +00:00
|
|
|
#endif
|
2012-09-23 18:50:56 +00:00
|
|
|
#endif
|
2011-11-23 17:14:29 +00:00
|
|
|
|
2010-03-07 20:27:40 +00:00
|
|
|
#ifdef WITH_OPENJPEG
|
2012-03-18 09:27:36 +00:00
|
|
|
# define R_IMF_ENUM_JPEG2K {R_IMF_IMTYPE_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", \
|
|
|
|
|
"Output image in JPEG 2000 format"},
|
2011-11-23 17:14:29 +00:00
|
|
|
#else
|
|
|
|
|
# define R_IMF_ENUM_JPEG2K
|
2010-03-07 20:27:40 +00:00
|
|
|
#endif
|
2011-11-23 17:14:29 +00:00
|
|
|
|
2010-08-03 11:25:34 +00:00
|
|
|
#ifdef WITH_CINEON
|
2012-03-18 09:27:36 +00:00
|
|
|
# define R_IMF_ENUM_CINEON {R_IMF_IMTYPE_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", \
|
|
|
|
|
"Output image in Cineon format"},
|
2012-04-29 15:47:02 +00:00
|
|
|
# define R_IMF_ENUM_DPX {R_IMF_IMTYPE_DPX, "DPX", ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
|
2011-11-23 17:14:29 +00:00
|
|
|
#else
|
|
|
|
|
# define R_IMF_ENUM_CINEON
|
|
|
|
|
# define R_IMF_ENUM_DPX
|
2010-08-03 11:25:34 +00:00
|
|
|
#endif
|
2011-11-23 17:14:29 +00:00
|
|
|
|
2010-03-07 20:27:40 +00:00
|
|
|
#ifdef WITH_OPENEXR
|
2015-04-06 10:40:12 -03:00
|
|
|
# define R_IMF_ENUM_EXR_MULTILAYER {R_IMF_IMTYPE_MULTILAYER, "OPEN_EXR_MULTILAYER", ICON_FILE_IMAGE, \
|
2012-03-18 09:27:36 +00:00
|
|
|
"OpenEXR MultiLayer", \
|
|
|
|
|
"Output image in multilayer OpenEXR format"},
|
|
|
|
|
# define R_IMF_ENUM_EXR {R_IMF_IMTYPE_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", \
|
|
|
|
|
"Output image in OpenEXR format"},
|
2011-11-23 17:14:29 +00:00
|
|
|
#else
|
2015-04-06 10:40:12 -03:00
|
|
|
# define R_IMF_ENUM_EXR_MULTILAYER
|
2011-11-23 17:14:29 +00:00
|
|
|
# define R_IMF_ENUM_EXR
|
2010-03-07 20:27:40 +00:00
|
|
|
#endif
|
2011-11-23 17:14:29 +00:00
|
|
|
|
2010-08-03 11:25:34 +00:00
|
|
|
#ifdef WITH_HDR
|
2012-03-18 09:27:36 +00:00
|
|
|
# define R_IMF_ENUM_HDR {R_IMF_IMTYPE_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", \
|
|
|
|
|
"Output image in Radiance HDR format"},
|
2011-11-23 17:14:29 +00:00
|
|
|
#else
|
|
|
|
|
# define R_IMF_ENUM_HDR
|
2010-08-03 11:25:34 +00:00
|
|
|
#endif
|
2011-11-23 17:14:29 +00:00
|
|
|
|
2010-05-21 03:25:38 +00:00
|
|
|
#ifdef WITH_TIFF
|
2011-11-23 17:14:29 +00:00
|
|
|
# define R_IMF_ENUM_TIFF {R_IMF_IMTYPE_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"},
|
|
|
|
|
#else
|
|
|
|
|
# define R_IMF_ENUM_TIFF
|
2010-05-21 03:25:38 +00:00
|
|
|
#endif
|
2011-11-23 17:14:29 +00:00
|
|
|
|
|
|
|
|
#define IMAGE_TYPE_ITEMS_IMAGE_ONLY \
|
|
|
|
|
R_IMF_ENUM_BMP \
|
2012-08-22 13:10:37 +00:00
|
|
|
/* DDS save not supported yet R_IMF_ENUM_DDS */ \
|
2011-11-23 17:14:29 +00:00
|
|
|
R_IMF_ENUM_IRIS \
|
|
|
|
|
R_IMF_ENUM_PNG \
|
|
|
|
|
R_IMF_ENUM_JPEG \
|
|
|
|
|
R_IMF_ENUM_JPEG2K \
|
|
|
|
|
R_IMF_ENUM_TAGA \
|
|
|
|
|
R_IMF_ENUM_TAGA_RAW \
|
|
|
|
|
{0, "", 0, " ", NULL}, \
|
|
|
|
|
R_IMF_ENUM_CINEON \
|
|
|
|
|
R_IMF_ENUM_DPX \
|
2015-04-06 10:40:12 -03:00
|
|
|
R_IMF_ENUM_EXR_MULTILAYER \
|
2011-11-23 17:14:29 +00:00
|
|
|
R_IMF_ENUM_EXR \
|
|
|
|
|
R_IMF_ENUM_HDR \
|
|
|
|
|
R_IMF_ENUM_TIFF \
|
2011-11-21 20:19:58 +00:00
|
|
|
|
|
|
|
|
|
2011-11-23 17:14:29 +00:00
|
|
|
EnumPropertyItem image_only_type_items[] = {
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2011-11-23 17:14:29 +00:00
|
|
|
IMAGE_TYPE_ITEMS_IMAGE_ONLY
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_image_type_items[] = {
|
2012-04-13 20:25:05 +00:00
|
|
|
{0, "", 0, N_("Image"), NULL},
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2011-11-23 17:14:29 +00:00
|
|
|
IMAGE_TYPE_ITEMS_IMAGE_ONLY
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-04-13 20:25:05 +00:00
|
|
|
{0, "", 0, N_("Movie"), NULL},
|
2011-11-22 00:35:26 +00:00
|
|
|
{R_IMF_IMTYPE_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"},
|
|
|
|
|
{R_IMF_IMTYPE_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"},
|
2011-07-21 23:06:51 +00:00
|
|
|
#ifdef WITH_FRAMESERVER
|
2011-11-22 00:35:26 +00:00
|
|
|
{R_IMF_IMTYPE_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", "Output image to a frameserver"},
|
2011-07-21 23:06:51 +00:00
|
|
|
#endif
|
2010-05-19 11:23:50 +00:00
|
|
|
#ifdef WITH_FFMPEG
|
2011-11-22 00:35:26 +00:00
|
|
|
{R_IMF_IMTYPE_H264, "H264", ICON_FILE_MOVIE, "H.264", "Output video in H.264 format"},
|
|
|
|
|
{R_IMF_IMTYPE_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", "Output video in MPEG format"},
|
|
|
|
|
{R_IMF_IMTYPE_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", "Output video in Ogg format"},
|
2010-03-07 20:27:40 +00:00
|
|
|
#endif
|
|
|
|
|
#ifdef WITH_QUICKTIME
|
2013-11-06 01:45:15 +00:00
|
|
|
{R_IMF_IMTYPE_QUICKTIME, "QUICKTIME", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"},
|
2010-03-07 20:27:40 +00:00
|
|
|
#endif
|
|
|
|
|
#ifdef WITH_FFMPEG
|
2011-11-22 00:35:26 +00:00
|
|
|
{R_IMF_IMTYPE_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", "Output video in Xvid format"},
|
2010-03-07 20:27:40 +00:00
|
|
|
#endif
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2010-03-07 20:27:40 +00:00
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_image_color_mode_items[] = {
|
2011-11-21 20:47:19 +00:00
|
|
|
{R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
|
|
|
|
|
{R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
|
|
|
|
|
{R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2011-08-24 00:44:58 +00:00
|
|
|
|
2013-01-11 03:21:24 +00:00
|
|
|
#ifdef RNA_RUNTIME
|
2015-11-23 13:49:52 +11:00
|
|
|
#define IMAGE_COLOR_MODE_BW rna_enum_image_color_mode_items[0]
|
|
|
|
|
#define IMAGE_COLOR_MODE_RGB rna_enum_image_color_mode_items[1]
|
|
|
|
|
#define IMAGE_COLOR_MODE_RGBA rna_enum_image_color_mode_items[2]
|
2013-01-11 03:21:24 +00:00
|
|
|
#endif
|
2011-11-26 13:11:55 +00:00
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_image_color_depth_items[] = {
|
2011-11-21 20:19:58 +00:00
|
|
|
/* 1 (monochrome) not used */
|
|
|
|
|
{R_IMF_CHAN_DEPTH_8, "8", 0, "8", "8 bit color channels"},
|
Patch #27397: Improved DPX/Cineon code
Patch by Julien Enche, thanks!
From the patch comment:
It allows Blender to load:
- 1, 8, 10, 12 and 16 bits files. For 10 and 12 bits files, packed or
filled type A/B are supported.
- RGB, Log, Luma and YCbCr colorspaces.
- Big and little endian storage.
- Multi-elements (planar) storage.
It allows Blender to save :
- 8, 10, 12 and 16 bits file. For 10 and 12 bits files, the most used
type A padding is used.
- RGB and Log colorspaces (Cineon can only be saved in Log colorspace).
For Log colorspace, the common default values are used for gamma,
reference black and reference white (respectively 1.7, 95 and 685 for
10 bits files).
- Saved DPX/Cineon files now match the viewer.
Some files won't load (mostly because I haven't seen any of them):
- Compressed files
- 32 and 64 bits files
- Image orientation information are not taken in account. Here too,
I haven't seen any file that was not top-bottom/left-right oriented.
2012-10-22 12:49:00 +00:00
|
|
|
{R_IMF_CHAN_DEPTH_10, "10", 0, "10", "10 bit color channels"},
|
2011-11-21 20:19:58 +00:00
|
|
|
{R_IMF_CHAN_DEPTH_12, "12", 0, "12", "12 bit color channels"},
|
|
|
|
|
{R_IMF_CHAN_DEPTH_16, "16", 0, "16", "16 bit color channels"},
|
|
|
|
|
/* 24 not used */
|
|
|
|
|
{R_IMF_CHAN_DEPTH_32, "32", 0, "32", "32 bit color channels"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2011-08-24 00:44:58 +00:00
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_normal_space_items[] = {
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
{R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"},
|
|
|
|
|
{R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normals in tangent space"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_normal_swizzle_items[] = {
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
{R_BAKE_POSX, "POS_X", 0, "+X", ""},
|
|
|
|
|
{R_BAKE_POSY, "POS_Y", 0, "+Y", ""},
|
|
|
|
|
{R_BAKE_POSZ, "POS_Z", 0, "+Z", ""},
|
|
|
|
|
{R_BAKE_NEGX, "NEG_X", 0, "-X", ""},
|
|
|
|
|
{R_BAKE_NEGY, "NEG_Y", 0, "-Y", ""},
|
|
|
|
|
{R_BAKE_NEGZ, "NEG_Z", 0, "-Z", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_bake_save_mode_items[] = {
|
2015-10-24 02:44:43 +11:00
|
|
|
{R_BAKE_SAVE_INTERNAL, "INTERNAL", 0, "Internal", "Save the baking map in an internal image data-block"},
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
{R_BAKE_SAVE_EXTERNAL, "EXTERNAL", 0, "External", "Save the baking map in an external file"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
#define R_IMF_VIEWS_ENUM_IND {R_IMF_VIEWS_INDIVIDUAL, "INDIVIDUAL", 0, "Individual", \
|
|
|
|
|
"Individual files for each view with the prefix as defined by the scene views"},
|
|
|
|
|
#define R_IMF_VIEWS_ENUM_S3D {R_IMF_VIEWS_STEREO_3D, "STEREO_3D", 0, "Stereo 3D", \
|
|
|
|
|
"Single file with an encoded stereo pair"},
|
2015-04-06 10:40:12 -03:00
|
|
|
#define R_IMF_VIEWS_ENUM_MV {R_IMF_VIEWS_MULTIVIEW, "MULTIVIEW", 0, "Multi-View", "Single file with all the views"},
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_views_format_items[] = {
|
2015-04-06 10:40:12 -03:00
|
|
|
R_IMF_VIEWS_ENUM_IND
|
|
|
|
|
R_IMF_VIEWS_ENUM_S3D
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_views_format_multilayer_items[] = {
|
2015-04-06 10:40:12 -03:00
|
|
|
R_IMF_VIEWS_ENUM_IND
|
|
|
|
|
R_IMF_VIEWS_ENUM_MV
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_views_format_multiview_items[] = {
|
2015-04-06 10:40:12 -03:00
|
|
|
R_IMF_VIEWS_ENUM_IND
|
|
|
|
|
R_IMF_VIEWS_ENUM_S3D
|
|
|
|
|
R_IMF_VIEWS_ENUM_MV
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#undef R_IMF_VIEWS_ENUM_IND
|
|
|
|
|
#undef R_IMF_VIEWS_ENUM_S3D
|
|
|
|
|
#undef R_IMF_VIEWS_ENUM_MV
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_stereo3d_display_items[] = {
|
2015-04-06 20:43:34 +02:00
|
|
|
{S3D_DISPLAY_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph",
|
2015-08-06 12:34:31 +10:00
|
|
|
"Render views for left and right eyes as two differently filtered colors in a single image "
|
|
|
|
|
"(anaglyph glasses are required)"},
|
2015-04-06 20:43:34 +02:00
|
|
|
{S3D_DISPLAY_INTERLACE, "INTERLACE", 0, "Interlace",
|
2015-08-06 12:34:31 +10:00
|
|
|
"Render views for left and right eyes interlaced in a single image (3D-ready monitor is required)"},
|
2015-04-06 20:43:34 +02:00
|
|
|
{S3D_DISPLAY_PAGEFLIP, "TIMESEQUENTIAL", 0, "Time Sequential",
|
2015-08-06 12:34:31 +10:00
|
|
|
"Render alternate eyes (also known as page flip, quad buffer support in the graphic card is required)"},
|
2015-04-06 20:43:34 +02:00
|
|
|
{S3D_DISPLAY_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-Side", "Render views for left and right eyes side-by-side"},
|
|
|
|
|
{S3D_DISPLAY_TOPBOTTOM, "TOPBOTTOM", 0, "Top-Bottom", "Render views for left and right eyes one above another"},
|
2015-04-06 10:40:12 -03:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[] = {
|
2015-04-06 10:40:12 -03:00
|
|
|
{S3D_ANAGLYPH_REDCYAN, "RED_CYAN", 0, "Red-Cyan", ""},
|
|
|
|
|
{S3D_ANAGLYPH_GREENMAGENTA, "GREEN_MAGENTA", 0, "Green-Magenta", ""},
|
|
|
|
|
{S3D_ANAGLYPH_YELLOWBLUE, "YELLOW_BLUE", 0, "Yellow-Blue", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_stereo3d_interlace_type_items[] = {
|
2015-04-06 10:40:12 -03:00
|
|
|
{S3D_INTERLACE_ROW, "ROW_INTERLEAVED", 0, "Row Interleaved", ""},
|
|
|
|
|
{S3D_INTERLACE_COLUMN, "COLUMN_INTERLEAVED", 0, "Column Interleaved", ""},
|
|
|
|
|
{S3D_INTERLACE_CHECKERBOARD, "CHECKERBOARD_INTERLEAVED", 0, "Checkerboard Interleaved", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
#ifdef RNA_RUNTIME
|
|
|
|
|
|
2009-08-17 07:35:38 +00:00
|
|
|
#include "DNA_anim_types.h"
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
#include "DNA_node_types.h"
|
- add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)
- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.
- removed OBJECT_OT_mesh_add, use the python add menu instead.
- made mesh primitive ops - MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.
- RNA scene.active_object wrapped
- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
|
|
|
#include "DNA_object_types.h"
|
2009-12-22 16:11:11 +00:00
|
|
|
#include "DNA_mesh_types.h"
|
2014-05-13 11:50:54 +09:00
|
|
|
#include "DNA_text_types.h"
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2010-11-10 00:51:34 +00:00
|
|
|
#include "RNA_access.h"
|
|
|
|
|
|
2010-08-16 05:46:10 +00:00
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
|
|
2012-01-14 23:54:51 +00:00
|
|
|
#include "BKE_brush.h"
|
2009-01-08 13:57:29 +00:00
|
|
|
#include "BKE_context.h"
|
2008-10-31 23:50:02 +00:00
|
|
|
#include "BKE_global.h"
|
2010-01-09 00:16:35 +00:00
|
|
|
#include "BKE_image.h"
|
2009-10-26 12:42:25 +00:00
|
|
|
#include "BKE_main.h"
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
#include "BKE_node.h"
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
#include "BKE_pointcache.h"
|
2009-10-26 12:42:25 +00:00
|
|
|
#include "BKE_scene.h"
|
2009-11-20 10:00:54 +00:00
|
|
|
#include "BKE_depsgraph.h"
|
2009-12-22 16:11:11 +00:00
|
|
|
#include "BKE_mesh.h"
|
2010-02-07 23:41:17 +00:00
|
|
|
#include "BKE_sound.h"
|
2010-04-22 19:57:18 +00:00
|
|
|
#include "BKE_screen.h"
|
2011-08-07 11:54:58 +00:00
|
|
|
#include "BKE_sequencer.h"
|
2010-08-30 14:33:46 +00:00
|
|
|
#include "BKE_animsys.h"
|
2014-05-13 10:28:47 +09:00
|
|
|
#include "BKE_freestyle.h"
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2009-08-19 12:35:40 +00:00
|
|
|
#include "ED_info.h"
|
2009-08-19 00:55:30 +00:00
|
|
|
#include "ED_node.h"
|
2009-10-26 12:42:25 +00:00
|
|
|
#include "ED_view3d.h"
|
2009-12-22 16:11:11 +00:00
|
|
|
#include "ED_mesh.h"
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
#include "ED_keyframing.h"
|
2012-01-17 16:31:13 +00:00
|
|
|
#include "ED_image.h"
|
2009-08-19 00:55:30 +00:00
|
|
|
|
2014-01-28 23:24:59 +09:00
|
|
|
#ifdef WITH_FREESTYLE
|
|
|
|
|
#include "FRS_freestyle.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-01-17 16:31:13 +00:00
|
|
|
static void rna_SpaceImageEditor_uv_sculpt_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))
|
|
|
|
|
{
|
2015-08-31 21:37:38 +03:00
|
|
|
ED_space_image_uv_sculpt_update(bmain->wm.first, scene);
|
2012-01-17 16:31:13 +00:00
|
|
|
}
|
|
|
|
|
|
2011-01-05 14:49:08 +00:00
|
|
|
static int rna_Scene_object_bases_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
|
2010-11-10 00:51:34 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2010-11-10 00:51:34 +00:00
|
|
|
Base *base;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (base = scene->base.first; base; base = base->next) {
|
2015-01-26 16:03:11 +01:00
|
|
|
if (STREQLEN(base->object->id.name + 2, key, sizeof(base->object->id.name) - 2)) {
|
2012-03-05 23:30:41 +00:00
|
|
|
*r_ptr = rna_pointer_inherit_refine(ptr, &RNA_ObjectBase, base);
|
2014-04-01 11:34:00 +11:00
|
|
|
return true;
|
2010-11-10 00:51:34 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2014-04-01 11:34:00 +11:00
|
|
|
return false;
|
2010-11-10 00:51:34 +00:00
|
|
|
}
|
|
|
|
|
|
2009-09-14 16:52:06 +00:00
|
|
|
static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
|
2008-10-31 23:50:02 +00:00
|
|
|
{
|
2014-04-05 14:36:18 +02:00
|
|
|
ListBaseIterator *internal = &iter->internal.listbase;
|
2008-11-17 18:44:06 +00:00
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
/* we are actually iterating a Base list, so override get */
|
2012-05-10 15:22:29 +00:00
|
|
|
return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ((Base *)internal->link)->object);
|
2008-10-31 23:50:02 +00:00
|
|
|
}
|
|
|
|
|
|
2010-04-14 08:52:22 +00:00
|
|
|
static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *reports, Object *ob)
|
2009-11-20 10:00:54 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Scene *scene_act = CTX_data_scene(C);
|
2010-01-09 23:44:01 +00:00
|
|
|
Base *base;
|
|
|
|
|
|
2012-05-05 14:33:36 +00:00
|
|
|
if (BKE_scene_base_find(scene, ob)) {
|
2012-10-20 10:28:34 +00:00
|
|
|
BKE_reportf(reports, RPT_ERROR, "Object '%s' is already in scene '%s'", ob->id.name + 2, scene->id.name + 2);
|
2010-02-10 16:10:47 +00:00
|
|
|
return NULL;
|
2009-11-20 10:00:54 +00:00
|
|
|
}
|
2010-01-09 23:44:01 +00:00
|
|
|
|
2012-05-05 14:33:36 +00:00
|
|
|
base = BKE_scene_base_add(scene, ob);
|
2011-03-31 08:49:52 +00:00
|
|
|
id_us_plus(&ob->id);
|
2009-11-20 10:00:54 +00:00
|
|
|
|
2012-05-05 14:03:12 +00:00
|
|
|
/* this is similar to what object_add_type and BKE_object_add do */
|
2012-03-05 23:30:41 +00:00
|
|
|
base->lay = scene->lay;
|
2010-04-14 08:52:22 +00:00
|
|
|
|
2012-03-18 07:38:51 +00:00
|
|
|
/* when linking to an inactive scene don't touch the layer */
|
2012-03-05 23:30:41 +00:00
|
|
|
if (scene == scene_act)
|
|
|
|
|
ob->lay = base->lay;
|
2010-04-14 08:52:22 +00:00
|
|
|
|
2015-07-13 15:59:58 +02:00
|
|
|
/* TODO(sergey): Only update relations for the current scene. */
|
|
|
|
|
DAG_relations_tag_update(CTX_data_main(C));
|
2013-02-21 19:33:04 +00:00
|
|
|
DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
|
2009-11-20 10:00:54 +00:00
|
|
|
|
2010-08-13 15:07:57 +00:00
|
|
|
/* slows down importers too much, run scene.update() */
|
2013-02-21 19:33:04 +00:00
|
|
|
/* DAG_srelations_tag_update(G.main); */
|
2010-02-10 16:10:47 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_OB_ACTIVE, scene);
|
2010-08-25 16:25:55 +00:00
|
|
|
|
2010-02-10 16:10:47 +00:00
|
|
|
return base;
|
2009-11-20 10:00:54 +00:00
|
|
|
}
|
|
|
|
|
|
2010-04-06 01:28:39 +00:00
|
|
|
static void rna_Scene_object_unlink(Scene *scene, ReportList *reports, Object *ob)
|
2009-11-20 10:00:54 +00:00
|
|
|
{
|
2012-05-05 14:33:36 +00:00
|
|
|
Base *base = BKE_scene_base_find(scene, ob);
|
2009-11-20 10:00:54 +00:00
|
|
|
if (!base) {
|
2012-05-10 15:22:29 +00:00
|
|
|
BKE_reportf(reports, RPT_ERROR, "Object '%s' is not in this scene '%s'", ob->id.name + 2, scene->id.name + 2);
|
2009-11-20 10:00:54 +00:00
|
|
|
return;
|
|
|
|
|
}
|
2012-03-05 23:30:41 +00:00
|
|
|
if (base == scene->basact && ob->mode != OB_MODE_OBJECT) {
|
2012-10-20 10:28:34 +00:00
|
|
|
BKE_reportf(reports, RPT_ERROR, "Object '%s' must be in object mode to unlink", ob->id.name + 2);
|
2010-02-03 19:25:43 +00:00
|
|
|
return;
|
|
|
|
|
}
|
2012-03-05 23:30:41 +00:00
|
|
|
if (scene->basact == base) {
|
|
|
|
|
scene->basact = NULL;
|
2010-06-10 18:56:52 +00:00
|
|
|
}
|
2010-02-03 19:25:43 +00:00
|
|
|
|
2013-01-26 17:38:45 +00:00
|
|
|
BKE_scene_base_unlink(scene, base);
|
2010-06-10 18:56:52 +00:00
|
|
|
MEM_freeN(base);
|
2010-02-03 19:25:43 +00:00
|
|
|
|
2015-11-09 19:47:10 +01:00
|
|
|
id_us_min(&ob->id);
|
2010-01-24 17:40:05 +00:00
|
|
|
|
2012-03-09 00:41:09 +00:00
|
|
|
/* needed otherwise the depgraph will contain freed objects which can crash, see [#20958] */
|
2013-02-21 19:33:04 +00:00
|
|
|
DAG_relations_tag_update(G.main);
|
2010-02-10 09:30:22 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_OB_ACTIVE, scene);
|
2009-11-20 10:00:54 +00:00
|
|
|
}
|
|
|
|
|
|
2009-10-20 00:45:51 +00:00
|
|
|
static void rna_Scene_skgen_etch_template_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
ToolSettings *ts = (ToolSettings *)ptr->data;
|
|
|
|
|
if (value.data && ((Object *)value.data)->type == OB_ARMATURE)
|
2009-10-20 00:45:51 +00:00
|
|
|
ts->skgen_template = value.data;
|
|
|
|
|
else
|
|
|
|
|
ts->skgen_template = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
- add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)
- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.
- removed OBJECT_OT_mesh_add, use the python add menu instead.
- made mesh primitive ops - MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.
- RNA scene.active_object wrapped
- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
|
|
|
static PointerRNA rna_Scene_active_object_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
- add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)
- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.
- removed OBJECT_OT_mesh_add, use the python add menu instead.
- made mesh primitive ops - MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.
- RNA scene.active_object wrapped
- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_Object, scene->basact ? scene->basact->object : NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Scene_active_object_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (value.data)
|
2012-05-05 14:33:36 +00:00
|
|
|
scene->basact = BKE_scene_base_find(scene, (Object *)value.data);
|
- add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)
- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.
- removed OBJECT_OT_mesh_add, use the python add menu instead.
- made mesh primitive ops - MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.
- RNA scene.active_object wrapped
- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
|
|
|
else
|
2012-03-05 23:30:41 +00:00
|
|
|
scene->basact = NULL;
|
- add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)
- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.
- removed OBJECT_OT_mesh_add, use the python add menu instead.
- made mesh primitive ops - MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.
- RNA scene.active_object wrapped
- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
|
|
|
}
|
|
|
|
|
|
2009-10-14 13:20:20 +00:00
|
|
|
static void rna_Scene_set_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
|
|
|
|
Scene *set = (Scene *)value.data;
|
2009-10-14 13:20:20 +00:00
|
|
|
Scene *nested_set;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (nested_set = set; nested_set; nested_set = nested_set->set) {
|
|
|
|
|
if (nested_set == scene)
|
2009-10-14 13:20:20 +00:00
|
|
|
return;
|
2013-05-11 16:15:09 +00:00
|
|
|
/* prevent eternal loops, set can point to next, and next to set, without problems usually */
|
|
|
|
|
if (nested_set->set == set)
|
|
|
|
|
return;
|
2009-10-14 13:20:20 +00:00
|
|
|
}
|
|
|
|
|
|
2015-10-16 21:50:23 +11:00
|
|
|
id_lib_extern((ID *)set);
|
2012-03-05 23:30:41 +00:00
|
|
|
scene->set = set;
|
2009-10-14 13:20:20 +00:00
|
|
|
}
|
- add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)
- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.
- removed OBJECT_OT_mesh_add, use the python add menu instead.
- made mesh primitive ops - MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.
- RNA scene.active_object wrapped
- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
|
|
|
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
static void rna_Scene_layer_set(PointerRNA *ptr, const int *values)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
scene->lay = ED_view3d_scene_layer_set(scene->lay, values, &scene->layact);
|
2008-11-14 11:15:53 +00:00
|
|
|
}
|
|
|
|
|
|
2012-03-08 18:50:42 +00:00
|
|
|
static int rna_Scene_active_layer_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2012-03-08 18:50:42 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
return (int)(log(scene->layact) / M_LN2);
|
2008-11-14 11:15:53 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-04 04:00:53 +00:00
|
|
|
static void rna_Scene_view3d_update(Main *bmain, Scene *UNUSED(scene_unused), PointerRNA *ptr)
|
2009-10-26 12:42:25 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2009-10-26 12:42:25 +00:00
|
|
|
|
2010-04-22 19:57:18 +00:00
|
|
|
BKE_screen_view3d_main_sync(&bmain->screen, scene);
|
2009-10-26 12:42:25 +00:00
|
|
|
}
|
|
|
|
|
|
2011-03-27 23:11:22 +00:00
|
|
|
static void rna_Scene_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
rna_Scene_view3d_update(bmain, scene, ptr);
|
2013-08-26 12:22:15 +00:00
|
|
|
/* XXX We would need do_time=true here, else we can have update issues like [#36289]...
|
|
|
|
|
* However, this has too much drawbacks (like slower layer switch, undesired updates...).
|
|
|
|
|
* That's TODO for future DAG updates.
|
|
|
|
|
*/
|
|
|
|
|
DAG_on_visible_update(bmain, false);
|
2011-03-27 23:11:22 +00:00
|
|
|
}
|
|
|
|
|
|
2011-07-26 13:56:31 +00:00
|
|
|
static void rna_Scene_fps_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
|
|
|
|
|
{
|
2015-03-26 11:35:41 +01:00
|
|
|
BKE_sound_update_fps(scene);
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequencer_update_sound_bounds_all(scene);
|
2011-07-26 13:56:31 +00:00
|
|
|
}
|
|
|
|
|
|
2011-08-03 09:25:40 +00:00
|
|
|
static void rna_Scene_listener_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
|
|
|
|
|
{
|
2015-03-26 11:35:41 +01:00
|
|
|
BKE_sound_update_scene_listener(scene);
|
2011-08-03 09:25:40 +00:00
|
|
|
}
|
|
|
|
|
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
static void rna_Scene_volume_set(PointerRNA *ptr, float value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)(ptr->data);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
|
|
|
|
|
scene->audio.volume = value;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (scene->sound_scene)
|
2015-03-26 11:35:41 +01:00
|
|
|
BKE_sound_set_scene_volume(scene, value);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_Scene_framelen_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
|
2012-03-05 23:30:41 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
scene->r.framelen = (float)scene->r.framapto / (float)scene->r.images;
|
2010-12-29 18:21:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2012-09-23 18:50:56 +00:00
|
|
|
static void rna_Scene_frame_current_set(PointerRNA *ptr, int value)
|
2010-02-18 00:29:08 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *data = (Scene *)ptr->data;
|
2010-02-18 00:29:08 +00:00
|
|
|
|
|
|
|
|
/* if negative frames aren't allowed, then we can't use them */
|
|
|
|
|
FRAMENUMBER_MIN_CLAMP(value);
|
2012-03-05 23:30:41 +00:00
|
|
|
data->r.cfra = value;
|
2010-02-18 00:29:08 +00:00
|
|
|
}
|
|
|
|
|
|
2013-07-19 10:41:09 +00:00
|
|
|
static float rna_Scene_frame_current_final_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *)ptr->data;
|
|
|
|
|
|
|
|
|
|
return BKE_scene_frame_get_from_ctime(scene, (float)scene->r.cfra);
|
|
|
|
|
}
|
|
|
|
|
|
2008-11-26 23:13:59 +00:00
|
|
|
static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *data = (Scene *)ptr->data;
|
2010-02-18 00:29:08 +00:00
|
|
|
/* MINFRAME not MINAFRAME, since some output formats can't taken negative frames */
|
2012-03-06 21:42:03 +00:00
|
|
|
CLAMP(value, MINFRAME, MAXFRAME);
|
2012-03-05 23:30:41 +00:00
|
|
|
data->r.sfra = value;
|
2012-03-06 21:42:03 +00:00
|
|
|
|
|
|
|
|
if (data->r.sfra >= data->r.efra) {
|
2012-03-22 17:27:37 +00:00
|
|
|
data->r.efra = MIN2(data->r.sfra, MAXFRAME);
|
2012-03-06 21:42:03 +00:00
|
|
|
}
|
2008-11-26 23:13:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *data = (Scene *)ptr->data;
|
2012-03-06 21:42:03 +00:00
|
|
|
CLAMP(value, MINFRAME, MAXFRAME);
|
2012-03-05 23:30:41 +00:00
|
|
|
data->r.efra = value;
|
2012-03-06 21:42:03 +00:00
|
|
|
|
|
|
|
|
if (data->r.sfra >= data->r.efra) {
|
2012-03-22 17:27:37 +00:00
|
|
|
data->r.sfra = MAX2(data->r.efra, MINFRAME);
|
2012-03-06 21:42:03 +00:00
|
|
|
}
|
2008-11-26 23:13:59 +00:00
|
|
|
}
|
|
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
static void rna_Scene_use_preview_range_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *data = (Scene *)ptr->data;
|
2009-07-24 11:24:00 +00:00
|
|
|
|
|
|
|
|
if (value) {
|
2010-01-19 20:30:04 +00:00
|
|
|
/* copy range from scene if not set before */
|
|
|
|
|
if ((data->r.psfra == data->r.pefra) && (data->r.psfra == 0)) {
|
2012-03-05 23:30:41 +00:00
|
|
|
data->r.psfra = data->r.sfra;
|
|
|
|
|
data->r.pefra = data->r.efra;
|
2010-01-19 20:30:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
data->r.flag |= SCER_PRV_RANGE;
|
2009-07-24 11:24:00 +00:00
|
|
|
}
|
|
|
|
|
else
|
2010-01-19 20:30:04 +00:00
|
|
|
data->r.flag &= ~SCER_PRV_RANGE;
|
2009-07-24 11:24:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *data = (Scene *)ptr->data;
|
2009-07-24 11:24:00 +00:00
|
|
|
|
|
|
|
|
/* check if enabled already */
|
2010-01-19 20:30:04 +00:00
|
|
|
if ((data->r.flag & SCER_PRV_RANGE) == 0) {
|
2009-07-24 11:24:00 +00:00
|
|
|
/* set end of preview range to end frame, then clamp as per normal */
|
2012-03-05 23:30:41 +00:00
|
|
|
/* TODO: or just refuse to set instead? */
|
|
|
|
|
data->r.pefra = data->r.efra;
|
2009-07-24 11:24:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* now set normally */
|
2010-01-19 20:30:04 +00:00
|
|
|
CLAMP(value, MINAFRAME, data->r.pefra);
|
2012-03-05 23:30:41 +00:00
|
|
|
data->r.psfra = value;
|
2009-07-24 11:24:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *data = (Scene *)ptr->data;
|
2009-07-24 11:24:00 +00:00
|
|
|
|
|
|
|
|
/* check if enabled already */
|
2010-01-19 20:30:04 +00:00
|
|
|
if ((data->r.flag & SCER_PRV_RANGE) == 0) {
|
2009-07-24 11:24:00 +00:00
|
|
|
/* set start of preview range to start frame, then clamp as per normal */
|
2012-03-05 23:30:41 +00:00
|
|
|
/* TODO: or just refuse to set instead? */
|
2012-03-18 09:27:36 +00:00
|
|
|
data->r.psfra = data->r.sfra;
|
2009-07-24 11:24:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* now set normally */
|
|
|
|
|
CLAMP(value, data->r.psfra, MAXFRAME);
|
2012-03-05 23:30:41 +00:00
|
|
|
data->r.pefra = value;
|
2009-07-24 11:24:00 +00:00
|
|
|
}
|
|
|
|
|
|
2011-09-05 19:34:27 +00:00
|
|
|
static void rna_Scene_frame_update(Main *bmain, Scene *UNUSED(current_scene), PointerRNA *ptr)
|
2009-01-01 20:44:40 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2015-03-26 11:35:41 +01:00
|
|
|
BKE_sound_seek_scene(bmain, scene);
|
2009-01-01 20:44:40 +00:00
|
|
|
}
|
|
|
|
|
|
2009-08-17 07:35:38 +00:00
|
|
|
static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_KeyingSet, ANIM_scene_get_active_keyingset(scene));
|
2009-08-17 07:35:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2012-05-10 15:22:29 +00:00
|
|
|
KeyingSet *ks = (KeyingSet *)value.data;
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
scene->active_keyingset = ANIM_scene_get_keyingset_index(scene, ks);
|
2009-08-17 07:35:38 +00:00
|
|
|
}
|
|
|
|
|
|
2010-05-16 11:42:54 +00:00
|
|
|
/* get KeyingSet index stuff for list of Keying Sets editing UI
|
|
|
|
|
* - active_keyingset-1 since 0 is reserved for 'none'
|
2012-03-18 09:27:36 +00:00
|
|
|
* - don't clamp, otherwise can never set builtins types as active...
|
2010-05-16 11:42:54 +00:00
|
|
|
*/
|
|
|
|
|
static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
|
2009-08-17 07:35:38 +00:00
|
|
|
{
|
2012-03-18 09:27:36 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2012-05-10 15:22:29 +00:00
|
|
|
return scene->active_keyingset - 1;
|
2010-05-16 11:42:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* get KeyingSet index stuff for list of Keying Sets editing UI
|
2010-12-28 11:50:10 +00:00
|
|
|
* - value+1 since 0 is reserved for 'none'
|
2010-05-16 11:42:54 +00:00
|
|
|
*/
|
2012-03-18 09:27:36 +00:00
|
|
|
static void rna_Scene_active_keying_set_index_set(PointerRNA *ptr, int value)
|
2010-05-16 11:42:54 +00:00
|
|
|
{
|
2012-03-18 09:27:36 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2012-05-10 15:22:29 +00:00
|
|
|
scene->active_keyingset = value + 1;
|
2009-08-17 07:35:38 +00:00
|
|
|
}
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/* XXX: evil... builtin_keyingsets is defined in keyingsets.c! */
|
|
|
|
|
/* TODO: make API function to retrieve this... */
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
extern ListBase builtin_keyingsets;
|
2009-08-17 07:35:38 +00:00
|
|
|
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
static void rna_Scene_all_keyingsets_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
2009-08-17 07:35:38 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
|
2012-03-18 09:27:36 +00:00
|
|
|
/* start going over the scene KeyingSets first, while we still have pointer to it
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
* but only if we have any Keying Sets to use...
|
|
|
|
|
*/
|
|
|
|
|
if (scene->keyingsets.first)
|
|
|
|
|
rna_iterator_listbase_begin(iter, &scene->keyingsets, NULL);
|
|
|
|
|
else
|
|
|
|
|
rna_iterator_listbase_begin(iter, &builtin_keyingsets, NULL);
|
2009-08-17 07:35:38 +00:00
|
|
|
}
|
|
|
|
|
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
static void rna_Scene_all_keyingsets_next(CollectionPropertyIterator *iter)
|
2009-08-17 07:35:38 +00:00
|
|
|
{
|
2014-04-05 14:36:18 +02:00
|
|
|
ListBaseIterator *internal = &iter->internal.listbase;
|
2012-05-10 15:22:29 +00:00
|
|
|
KeyingSet *ks = (KeyingSet *)internal->link;
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
|
|
|
|
|
/* if we've run out of links in Scene list, jump over to the builtins list unless we're there already */
|
|
|
|
|
if ((ks->next == NULL) && (ks != builtin_keyingsets.last))
|
2012-05-10 15:22:29 +00:00
|
|
|
internal->link = (Link *)builtin_keyingsets.first;
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
else
|
2012-05-10 15:22:29 +00:00
|
|
|
internal->link = (Link *)ks->next;
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
iter->valid = (internal->link != NULL);
|
2009-08-17 07:35:38 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
static int rna_RenderSettings_stereoViews_skip(CollectionPropertyIterator *iter, void *UNUSED(data))
|
|
|
|
|
{
|
|
|
|
|
ListBaseIterator *internal = &iter->internal.listbase;
|
|
|
|
|
SceneRenderView *srv = (SceneRenderView *)internal->link;
|
|
|
|
|
|
|
|
|
|
if ((STREQ(srv->name, STEREO_LEFT_NAME)) ||
|
|
|
|
|
(STREQ(srv->name, STEREO_RIGHT_NAME)))
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static void rna_RenderSettings_stereoViews_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
|
|
|
|
rna_iterator_listbase_begin(iter, &rd->views, rna_RenderSettings_stereoViews_skip);
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static char *rna_RenderSettings_path(PointerRNA *UNUSED(ptr))
|
2009-08-13 07:28:51 +00:00
|
|
|
{
|
2010-02-23 12:48:35 +00:00
|
|
|
return BLI_sprintfN("render");
|
2009-08-13 07:28:51 +00:00
|
|
|
}
|
|
|
|
|
|
2010-02-23 12:48:35 +00:00
|
|
|
static int rna_RenderSettings_threads_get(PointerRNA *ptr)
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2013-05-08 13:23:17 +00:00
|
|
|
return BKE_render_num_threads(rd);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rna_RenderSettings_threads_mode_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
|
|
|
|
int override = BLI_system_num_threads_override_get();
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2013-05-08 13:23:17 +00:00
|
|
|
if (override > 0)
|
|
|
|
|
return R_FIXED_THREADS;
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
else
|
2013-05-08 13:23:17 +00:00
|
|
|
return (rd->mode & R_FIXED_THREADS);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
}
|
|
|
|
|
|
2014-12-03 12:24:57 +09:00
|
|
|
static int rna_RenderSettings_is_movie_format_get(PointerRNA *ptr)
|
2010-03-07 02:04:30 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2011-11-21 20:19:58 +00:00
|
|
|
return BKE_imtype_is_movie(rd->im_format.imtype);
|
2010-03-07 02:04:30 +00:00
|
|
|
}
|
|
|
|
|
|
2010-02-23 12:48:35 +00:00
|
|
|
static int rna_RenderSettings_save_buffers_get(PointerRNA *ptr)
|
2010-02-07 18:06:12 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2013-04-13 12:49:22 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (rd->mode & R_BORDER)
|
2010-02-07 18:06:12 +00:00
|
|
|
return 0;
|
2013-04-13 12:49:22 +00:00
|
|
|
else if (!BKE_scene_use_new_shading_nodes(scene))
|
2012-05-10 15:22:29 +00:00
|
|
|
return (rd->scemode & (R_EXR_TILE_FILE | R_FULL_SAMPLE)) != 0;
|
2013-04-13 12:49:22 +00:00
|
|
|
else
|
2015-02-21 12:47:29 +05:00
|
|
|
return (rd->scemode & R_EXR_TILE_FILE) != 0;
|
2010-02-07 18:06:12 +00:00
|
|
|
}
|
|
|
|
|
|
2010-02-23 12:48:35 +00:00
|
|
|
static int rna_RenderSettings_full_sample_get(PointerRNA *ptr)
|
2009-01-15 02:36:24 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2009-01-15 02:36:24 +00:00
|
|
|
|
2010-02-07 18:06:12 +00:00
|
|
|
return (rd->scemode & R_FULL_SAMPLE) && !(rd->mode & R_BORDER);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
}
|
|
|
|
|
|
2011-11-21 20:19:58 +00:00
|
|
|
static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
ImageFormatData *imf = (ImageFormatData *)ptr->data;
|
|
|
|
|
ID *id = ptr->id.data;
|
|
|
|
|
const char is_render = (id && GS(id->name) == ID_SCE);
|
2011-11-26 13:11:55 +00:00
|
|
|
/* see note below on why this is */
|
2014-03-31 14:20:55 +09:00
|
|
|
const char chan_flag = BKE_imtype_valid_channels(imf->imtype, true) | (is_render ? IMA_CHAN_FLAG_BW : 0);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
imf->imtype = value;
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2011-11-21 20:19:58 +00:00
|
|
|
/* ensure depth and color settings match */
|
2011-11-26 13:11:55 +00:00
|
|
|
if ( ((imf->planes == R_IMF_PLANES_BW) && !(chan_flag & IMA_CHAN_FLAG_BW)) ||
|
|
|
|
|
((imf->planes == R_IMF_PLANES_RGBA) && !(chan_flag & IMA_CHAN_FLAG_ALPHA)))
|
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
imf->planes = R_IMF_PLANES_RGB;
|
2011-11-21 20:19:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ensure usable depth */
|
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
const int depth_ok = BKE_imtype_valid_depths(imf->imtype);
|
2011-11-21 20:19:58 +00:00
|
|
|
if ((imf->depth & depth_ok) == 0) {
|
|
|
|
|
/* set first available depth */
|
2012-03-05 23:30:41 +00:00
|
|
|
char depth_ls[] = {R_IMF_CHAN_DEPTH_32,
|
2012-05-10 15:22:29 +00:00
|
|
|
R_IMF_CHAN_DEPTH_24,
|
|
|
|
|
R_IMF_CHAN_DEPTH_16,
|
|
|
|
|
R_IMF_CHAN_DEPTH_12,
|
Patch #27397: Improved DPX/Cineon code
Patch by Julien Enche, thanks!
From the patch comment:
It allows Blender to load:
- 1, 8, 10, 12 and 16 bits files. For 10 and 12 bits files, packed or
filled type A/B are supported.
- RGB, Log, Luma and YCbCr colorspaces.
- Big and little endian storage.
- Multi-elements (planar) storage.
It allows Blender to save :
- 8, 10, 12 and 16 bits file. For 10 and 12 bits files, the most used
type A padding is used.
- RGB and Log colorspaces (Cineon can only be saved in Log colorspace).
For Log colorspace, the common default values are used for gamma,
reference black and reference white (respectively 1.7, 95 and 685 for
10 bits files).
- Saved DPX/Cineon files now match the viewer.
Some files won't load (mostly because I haven't seen any of them):
- Compressed files
- 32 and 64 bits files
- Image orientation information are not taken in account. Here too,
I haven't seen any file that was not top-bottom/left-right oriented.
2012-10-22 12:49:00 +00:00
|
|
|
R_IMF_CHAN_DEPTH_10,
|
2012-05-10 15:22:29 +00:00
|
|
|
R_IMF_CHAN_DEPTH_8,
|
|
|
|
|
R_IMF_CHAN_DEPTH_1,
|
|
|
|
|
0};
|
2011-11-21 20:19:58 +00:00
|
|
|
int i;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (i = 0; depth_ls[i]; i++) {
|
2011-11-21 20:19:58 +00:00
|
|
|
if (depth_ok & depth_ls[i]) {
|
2012-03-05 23:30:41 +00:00
|
|
|
imf->depth = depth_ls[i];
|
2011-11-21 20:19:58 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2011-11-21 20:19:58 +00:00
|
|
|
if (id && GS(id->name) == ID_SCE) {
|
2012-03-05 23:30:41 +00:00
|
|
|
Scene *scene = ptr->id.data;
|
|
|
|
|
RenderData *rd = &scene->r;
|
2009-07-13 19:17:52 +00:00
|
|
|
#ifdef WITH_FFMPEG
|
2012-05-07 09:30:15 +00:00
|
|
|
BKE_ffmpeg_image_type_verify(rd, imf);
|
2009-07-13 19:17:52 +00:00
|
|
|
#endif
|
2009-11-20 10:37:50 +00:00
|
|
|
#ifdef WITH_QUICKTIME
|
2011-12-23 22:07:34 +00:00
|
|
|
quicktime_verify_image_type(rd, imf);
|
2009-11-20 10:37:50 +00:00
|
|
|
#endif
|
2011-11-21 20:19:58 +00:00
|
|
|
(void)rd;
|
|
|
|
|
}
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(
|
|
|
|
|
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
|
2010-01-08 13:52:38 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
ID *id = ptr->id.data;
|
2011-11-21 20:19:58 +00:00
|
|
|
if (id && GS(id->name) == ID_SCE) {
|
2015-11-23 13:49:52 +11:00
|
|
|
return rna_enum_image_type_items;
|
2011-11-21 20:19:58 +00:00
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return image_only_type_items;
|
|
|
|
|
}
|
2010-01-08 13:52:38 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(
|
|
|
|
|
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
|
2010-01-08 13:52:38 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
ImageFormatData *imf = (ImageFormatData *)ptr->data;
|
|
|
|
|
ID *id = ptr->id.data;
|
|
|
|
|
const char is_render = (id && GS(id->name) == ID_SCE);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2011-11-26 13:11:55 +00:00
|
|
|
/* note, we need to act differently for render
|
2012-07-03 19:09:07 +00:00
|
|
|
* where 'BW' will force grayscale even if the output format writes
|
2011-11-26 13:11:55 +00:00
|
|
|
* as RGBA, this is age old blender convention and not sure how useful
|
|
|
|
|
* it really is but keep it for now - campbell */
|
2014-03-31 14:20:55 +09:00
|
|
|
char chan_flag = BKE_imtype_valid_channels(imf->imtype, true) | (is_render ? IMA_CHAN_FLAG_BW : 0);
|
2012-02-07 17:11:56 +00:00
|
|
|
|
|
|
|
|
#ifdef WITH_FFMPEG
|
|
|
|
|
/* a WAY more crappy case than B&W flag: depending on codec, file format MIGHT support
|
|
|
|
|
* alpha channel. for example MPEG format with h264 codec can't do alpha channel, but
|
2012-07-26 17:41:09 +00:00
|
|
|
* the same MPEG format with QTRLE codec can easily handle alpha channel.
|
2012-02-07 17:11:56 +00:00
|
|
|
* not sure how to deal with such cases in a nicer way (sergey) */
|
2012-03-05 23:30:41 +00:00
|
|
|
if (is_render) {
|
2012-02-07 17:11:56 +00:00
|
|
|
Scene *scene = ptr->id.data;
|
|
|
|
|
RenderData *rd = &scene->r;
|
|
|
|
|
|
2012-05-07 09:30:15 +00:00
|
|
|
if (BKE_ffmpeg_alpha_channel_is_supported(rd))
|
2012-02-07 17:11:56 +00:00
|
|
|
chan_flag |= IMA_CHAN_FLAG_ALPHA;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2011-11-26 13:11:55 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
if (chan_flag == (IMA_CHAN_FLAG_BW | IMA_CHAN_FLAG_RGB | IMA_CHAN_FLAG_ALPHA)) {
|
2015-11-23 13:49:52 +11:00
|
|
|
return rna_enum_image_color_mode_items;
|
2011-11-21 20:19:58 +00:00
|
|
|
}
|
|
|
|
|
else {
|
2012-03-05 23:30:41 +00:00
|
|
|
int totitem = 0;
|
|
|
|
|
EnumPropertyItem *item = NULL;
|
2011-11-26 13:11:55 +00:00
|
|
|
|
|
|
|
|
if (chan_flag & IMA_CHAN_FLAG_BW) RNA_enum_item_add(&item, &totitem, &IMAGE_COLOR_MODE_BW);
|
|
|
|
|
if (chan_flag & IMA_CHAN_FLAG_RGB) RNA_enum_item_add(&item, &totitem, &IMAGE_COLOR_MODE_RGB);
|
|
|
|
|
if (chan_flag & IMA_CHAN_FLAG_ALPHA) RNA_enum_item_add(&item, &totitem, &IMAGE_COLOR_MODE_RGBA);
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
2014-01-04 18:08:43 +11:00
|
|
|
*r_free = true;
|
2011-11-26 13:11:55 +00:00
|
|
|
|
|
|
|
|
return item;
|
2011-11-21 20:19:58 +00:00
|
|
|
}
|
2010-01-08 13:52:38 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(
|
|
|
|
|
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
|
2009-09-28 12:10:13 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
ImageFormatData *imf = (ImageFormatData *)ptr->data;
|
2011-11-21 20:19:58 +00:00
|
|
|
|
|
|
|
|
if (imf == NULL) {
|
2015-11-23 13:49:52 +11:00
|
|
|
return rna_enum_image_color_depth_items;
|
2009-09-28 12:10:13 +00:00
|
|
|
}
|
2011-11-21 20:19:58 +00:00
|
|
|
else {
|
2012-03-05 23:30:41 +00:00
|
|
|
const int depth_ok = BKE_imtype_valid_depths(imf->imtype);
|
2014-07-20 01:30:29 +10:00
|
|
|
const int is_float = ELEM(imf->imtype, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem *item_8bit = &rna_enum_image_color_depth_items[0];
|
|
|
|
|
EnumPropertyItem *item_10bit = &rna_enum_image_color_depth_items[1];
|
|
|
|
|
EnumPropertyItem *item_12bit = &rna_enum_image_color_depth_items[2];
|
|
|
|
|
EnumPropertyItem *item_16bit = &rna_enum_image_color_depth_items[3];
|
|
|
|
|
EnumPropertyItem *item_32bit = &rna_enum_image_color_depth_items[4];
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
int totitem = 0;
|
|
|
|
|
EnumPropertyItem *item = NULL;
|
2011-11-21 20:19:58 +00:00
|
|
|
EnumPropertyItem tmp = {0, "", 0, "", ""};
|
|
|
|
|
|
|
|
|
|
if (depth_ok & R_IMF_CHAN_DEPTH_8) {
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, item_8bit);
|
|
|
|
|
}
|
|
|
|
|
|
Patch #27397: Improved DPX/Cineon code
Patch by Julien Enche, thanks!
From the patch comment:
It allows Blender to load:
- 1, 8, 10, 12 and 16 bits files. For 10 and 12 bits files, packed or
filled type A/B are supported.
- RGB, Log, Luma and YCbCr colorspaces.
- Big and little endian storage.
- Multi-elements (planar) storage.
It allows Blender to save :
- 8, 10, 12 and 16 bits file. For 10 and 12 bits files, the most used
type A padding is used.
- RGB and Log colorspaces (Cineon can only be saved in Log colorspace).
For Log colorspace, the common default values are used for gamma,
reference black and reference white (respectively 1.7, 95 and 685 for
10 bits files).
- Saved DPX/Cineon files now match the viewer.
Some files won't load (mostly because I haven't seen any of them):
- Compressed files
- 32 and 64 bits files
- Image orientation information are not taken in account. Here too,
I haven't seen any file that was not top-bottom/left-right oriented.
2012-10-22 12:49:00 +00:00
|
|
|
if (depth_ok & R_IMF_CHAN_DEPTH_10) {
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, item_10bit);
|
|
|
|
|
}
|
|
|
|
|
|
2011-11-21 20:19:58 +00:00
|
|
|
if (depth_ok & R_IMF_CHAN_DEPTH_12) {
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, item_12bit);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (depth_ok & R_IMF_CHAN_DEPTH_16) {
|
|
|
|
|
if (is_float) {
|
2012-03-05 23:30:41 +00:00
|
|
|
tmp = *item_16bit;
|
|
|
|
|
tmp.name = "Float (Half)";
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, item_16bit);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (depth_ok & R_IMF_CHAN_DEPTH_32) {
|
|
|
|
|
if (is_float) {
|
2012-03-05 23:30:41 +00:00
|
|
|
tmp = *item_32bit;
|
|
|
|
|
tmp.name = "Float (Full)";
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
RNA_enum_item_add(&item, &totitem, item_32bit);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
2014-01-04 18:08:43 +11:00
|
|
|
*r_free = true;
|
2011-11-21 20:19:58 +00:00
|
|
|
|
|
|
|
|
return item;
|
2009-09-28 12:10:13 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static EnumPropertyItem *rna_ImageFormatSettings_views_format_itemf(
|
|
|
|
|
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
|
2015-04-06 10:40:12 -03:00
|
|
|
{
|
|
|
|
|
ImageFormatData *imf = (ImageFormatData *)ptr->data;
|
|
|
|
|
|
|
|
|
|
if (imf == NULL) {
|
2015-11-23 13:49:52 +11:00
|
|
|
return rna_enum_views_format_items;
|
2015-04-06 10:40:12 -03:00
|
|
|
}
|
|
|
|
|
else if (imf->imtype == R_IMF_IMTYPE_OPENEXR) {
|
2015-11-23 13:49:52 +11:00
|
|
|
return rna_enum_views_format_multiview_items;
|
2015-04-06 10:40:12 -03:00
|
|
|
}
|
|
|
|
|
else if (imf->imtype == R_IMF_IMTYPE_MULTILAYER) {
|
2015-11-23 13:49:52 +11:00
|
|
|
return rna_enum_views_format_multilayer_items;
|
2015-04-06 10:40:12 -03:00
|
|
|
}
|
|
|
|
|
else {
|
2015-11-23 13:49:52 +11:00
|
|
|
return rna_enum_views_format_items;
|
2015-04-06 10:40:12 -03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-03-12 14:02:33 +01:00
|
|
|
#ifdef WITH_OPENEXR
|
|
|
|
|
/* OpenEXR */
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static EnumPropertyItem *rna_ImageFormatSettings_exr_codec_itemf(
|
|
|
|
|
bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
|
2015-03-12 14:02:33 +01:00
|
|
|
{
|
|
|
|
|
ImageFormatData *imf = (ImageFormatData *)ptr->data;
|
|
|
|
|
|
|
|
|
|
EnumPropertyItem *item = NULL;
|
|
|
|
|
int i = 1, totitem = 0;
|
|
|
|
|
|
2015-03-13 00:07:26 +11:00
|
|
|
if (imf->depth == 16)
|
2015-11-23 13:49:52 +11:00
|
|
|
return rna_enum_exr_codec_items; /* All compression types are defined for halfs */
|
2015-03-12 14:02:33 +01:00
|
|
|
|
|
|
|
|
for (i = 0; i < R_IMF_EXR_CODEC_MAX; i++) {
|
2015-03-13 00:07:26 +11:00
|
|
|
if ((i == R_IMF_EXR_CODEC_B44 || i == R_IMF_EXR_CODEC_B44A)) {
|
2015-03-12 14:02:33 +01:00
|
|
|
continue; /* B44 and B44A are not defined for 32 bit floats */
|
2015-03-13 00:07:26 +11:00
|
|
|
}
|
2015-03-12 14:02:33 +01:00
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_enum_item_add(&item, &totitem, &rna_enum_exr_codec_items[i]);
|
2015-03-12 14:02:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
|
|
|
|
*r_free = true;
|
|
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
2011-11-21 20:19:58 +00:00
|
|
|
static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
|
2009-09-28 12:10:13 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2011-11-21 20:19:58 +00:00
|
|
|
char ext[8];
|
2012-03-05 23:30:41 +00:00
|
|
|
ext[0] = '\0';
|
2015-01-24 16:48:23 +11:00
|
|
|
BKE_image_path_ensure_ext_from_imformat(ext, &rd->im_format);
|
2011-11-21 20:19:58 +00:00
|
|
|
return strlen(ext);
|
2009-09-28 12:10:13 +00:00
|
|
|
}
|
|
|
|
|
|
2011-11-21 20:19:58 +00:00
|
|
|
static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
|
2009-09-28 12:10:13 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2012-03-05 23:30:41 +00:00
|
|
|
str[0] = '\0';
|
2015-01-24 16:48:23 +11:00
|
|
|
BKE_image_path_ensure_ext_from_imformat(str, &rd->im_format);
|
2009-09-28 12:10:13 +00:00
|
|
|
}
|
|
|
|
|
|
2009-12-02 11:23:11 +00:00
|
|
|
#ifdef WITH_QUICKTIME
|
2010-02-23 12:48:35 +00:00
|
|
|
static int rna_RenderSettings_qtcodecsettings_codecType_get(PointerRNA *ptr)
|
2009-12-02 11:23:11 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
QuicktimeCodecSettings *settings = (QuicktimeCodecSettings *)ptr->data;
|
2009-12-02 11:23:11 +00:00
|
|
|
|
2012-02-13 20:47:29 +00:00
|
|
|
return quicktime_rnatmpvalue_from_videocodectype(settings->codecType);
|
2009-12-02 11:23:11 +00:00
|
|
|
}
|
|
|
|
|
|
2010-02-23 12:48:35 +00:00
|
|
|
static void rna_RenderSettings_qtcodecsettings_codecType_set(PointerRNA *ptr, int value)
|
2009-12-02 11:23:11 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
QuicktimeCodecSettings *settings = (QuicktimeCodecSettings *)ptr->data;
|
2009-12-02 11:23:11 +00:00
|
|
|
|
2012-02-13 20:47:29 +00:00
|
|
|
settings->codecType = quicktime_videocodecType_from_rnatmpvalue(value);
|
2009-12-02 11:23:11 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_codecType_itemf(
|
|
|
|
|
bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
|
2009-12-02 11:23:11 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
EnumPropertyItem *item = NULL;
|
2009-12-02 11:23:11 +00:00
|
|
|
EnumPropertyItem tmp = {0, "", 0, "", ""};
|
|
|
|
|
QuicktimeCodecTypeDesc *codecTypeDesc;
|
2012-03-05 23:30:41 +00:00
|
|
|
int i = 1, totitem = 0;
|
2013-02-28 15:33:29 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
for (i = 0; i < quicktime_get_num_videocodecs(); i++) {
|
2010-04-10 09:31:41 +00:00
|
|
|
codecTypeDesc = quicktime_get_videocodecType_desc(i);
|
2009-12-02 11:23:11 +00:00
|
|
|
if (!codecTypeDesc) break;
|
2013-02-28 15:33:29 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
tmp.value = codecTypeDesc->rnatmpvalue;
|
2013-02-28 15:33:29 +00:00
|
|
|
tmp.identifier = codecTypeDesc->codecName;
|
2012-03-05 23:30:41 +00:00
|
|
|
tmp.name = codecTypeDesc->codecName;
|
2009-12-02 11:23:11 +00:00
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
2014-01-04 18:08:43 +11:00
|
|
|
*r_free = true;
|
2009-12-02 11:23:11 +00:00
|
|
|
|
2012-03-18 09:27:36 +00:00
|
|
|
return item;
|
2010-04-10 09:31:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rna_RenderSettings_qtcodecsettings_audiocodecType_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
QuicktimeCodecSettings *settings = (QuicktimeCodecSettings *)ptr->data;
|
2010-04-10 09:31:41 +00:00
|
|
|
|
2012-02-13 20:47:29 +00:00
|
|
|
return quicktime_rnatmpvalue_from_audiocodectype(settings->audiocodecType);
|
2010-04-10 09:31:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_RenderSettings_qtcodecsettings_audiocodecType_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
QuicktimeCodecSettings *settings = (QuicktimeCodecSettings *)ptr->data;
|
2010-04-10 09:31:41 +00:00
|
|
|
|
2012-02-13 20:47:29 +00:00
|
|
|
settings->audiocodecType = quicktime_audiocodecType_from_rnatmpvalue(value);
|
2010-04-10 09:31:41 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static EnumPropertyItem *rna_RenderSettings_qtcodecsettings_audiocodecType_itemf(
|
|
|
|
|
bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
|
2010-04-10 09:31:41 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
EnumPropertyItem *item = NULL;
|
2010-04-10 09:31:41 +00:00
|
|
|
EnumPropertyItem tmp = {0, "", 0, "", ""};
|
|
|
|
|
QuicktimeCodecTypeDesc *codecTypeDesc;
|
2012-03-05 23:30:41 +00:00
|
|
|
int i = 1, totitem = 0;
|
2010-04-10 09:31:41 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
for (i = 0; i < quicktime_get_num_audiocodecs(); i++) {
|
2010-04-10 09:31:41 +00:00
|
|
|
codecTypeDesc = quicktime_get_audiocodecType_desc(i);
|
|
|
|
|
if (!codecTypeDesc) break;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
tmp.value = codecTypeDesc->rnatmpvalue;
|
2012-03-18 09:27:36 +00:00
|
|
|
tmp.identifier = codecTypeDesc->codecName;
|
2012-03-05 23:30:41 +00:00
|
|
|
tmp.name = codecTypeDesc->codecName;
|
2010-04-10 09:31:41 +00:00
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
2014-01-04 18:08:43 +11:00
|
|
|
*r_free = true;
|
2010-04-10 09:31:41 +00:00
|
|
|
|
2012-03-18 09:27:36 +00:00
|
|
|
return item;
|
2012-03-05 23:30:41 +00:00
|
|
|
}
|
2009-12-02 11:23:11 +00:00
|
|
|
#endif
|
|
|
|
|
|
2012-01-19 04:04:05 +00:00
|
|
|
#ifdef WITH_FFMPEG
|
2012-01-13 12:34:41 +00:00
|
|
|
static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, int value)
|
2012-01-13 12:34:23 +00:00
|
|
|
{
|
2012-01-13 12:34:41 +00:00
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
|
|
|
|
RenderData *rd = &scene->r;
|
2012-01-13 12:34:23 +00:00
|
|
|
|
|
|
|
|
if (value)
|
|
|
|
|
rd->ffcodecdata.flags |= FFMPEG_LOSSLESS_OUTPUT;
|
|
|
|
|
else
|
|
|
|
|
rd->ffcodecdata.flags &= ~FFMPEG_LOSSLESS_OUTPUT;
|
2012-02-07 17:11:56 +00:00
|
|
|
|
2012-05-07 09:30:15 +00:00
|
|
|
BKE_ffmpeg_codec_settings_verify(rd);
|
2012-02-07 17:11:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_FFmpegSettings_codec_settings_update(Main *UNUSED(bmain), Scene *UNUSED(scene_unused), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
|
|
|
|
RenderData *rd = &scene->r;
|
|
|
|
|
|
2012-05-07 09:30:15 +00:00
|
|
|
BKE_ffmpeg_codec_settings_verify(rd);
|
2012-01-13 12:34:23 +00:00
|
|
|
}
|
2012-01-19 04:04:05 +00:00
|
|
|
#endif
|
2012-01-13 12:34:23 +00:00
|
|
|
|
2010-02-23 12:48:35 +00:00
|
|
|
static int rna_RenderSettings_active_layer_index_get(PointerRNA *ptr)
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
return rd->actlay;
|
|
|
|
|
}
|
|
|
|
|
|
2010-02-23 12:48:35 +00:00
|
|
|
static void rna_RenderSettings_active_layer_index_set(PointerRNA *ptr, int value)
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2014-11-16 13:57:58 +01:00
|
|
|
int num_layers = BLI_listbase_count(&rd->layers);
|
2014-05-23 18:30:36 +02:00
|
|
|
rd->actlay = min_ff(value, num_layers - 1);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
}
|
2009-01-15 02:36:24 +00:00
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static void rna_RenderSettings_active_layer_index_range(
|
|
|
|
|
PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
*min = 0;
|
2014-11-16 13:57:58 +01:00
|
|
|
*max = max_ii(0, BLI_listbase_count(&rd->layers) - 1);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
}
|
|
|
|
|
|
2010-08-25 07:03:35 +00:00
|
|
|
static PointerRNA rna_RenderSettings_active_layer_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2010-08-25 07:03:35 +00:00
|
|
|
SceneRenderLayer *srl = BLI_findlink(&rd->layers, rd->actlay);
|
|
|
|
|
|
|
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_SceneRenderLayer, srl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_RenderSettings_active_layer_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
|
|
|
|
SceneRenderLayer *srl = (SceneRenderLayer *)value.data;
|
2012-03-05 23:30:41 +00:00
|
|
|
const int index = BLI_findindex(&rd->layers, srl);
|
|
|
|
|
if (index != -1) rd->actlay = index;
|
2010-08-25 07:03:35 +00:00
|
|
|
}
|
|
|
|
|
|
2011-11-18 08:42:44 +00:00
|
|
|
static SceneRenderLayer *rna_RenderLayer_new(ID *id, RenderData *UNUSED(rd), const char *name)
|
2011-11-18 07:11:54 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2012-05-05 14:33:36 +00:00
|
|
|
SceneRenderLayer *srl = BKE_scene_add_render_layer(scene, name);
|
2011-11-18 07:11:54 +00:00
|
|
|
|
2014-02-26 18:35:55 +01:00
|
|
|
DAG_id_tag_update(&scene->id, 0);
|
2012-05-10 15:22:29 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-18 07:11:54 +00:00
|
|
|
|
|
|
|
|
return srl;
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static void rna_RenderLayer_remove(
|
|
|
|
|
ID *id, RenderData *UNUSED(rd), Main *bmain, ReportList *reports, PointerRNA *srl_ptr)
|
2011-11-18 07:11:54 +00:00
|
|
|
{
|
2012-11-02 09:41:26 +00:00
|
|
|
SceneRenderLayer *srl = srl_ptr->data;
|
2012-03-05 23:30:41 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2011-11-18 07:11:54 +00:00
|
|
|
|
2012-05-05 14:33:36 +00:00
|
|
|
if (!BKE_scene_remove_render_layer(bmain, scene, srl)) {
|
2012-10-26 17:32:50 +00:00
|
|
|
BKE_reportf(reports, RPT_ERROR, "Render layer '%s' could not be removed from scene '%s'",
|
2012-05-10 15:22:29 +00:00
|
|
|
srl->name, scene->id.name + 2);
|
2012-11-02 09:41:26 +00:00
|
|
|
return;
|
2011-11-18 08:42:44 +00:00
|
|
|
}
|
2012-11-02 09:41:26 +00:00
|
|
|
|
|
|
|
|
RNA_POINTER_INVALIDATE(srl_ptr);
|
|
|
|
|
|
2014-02-26 18:35:55 +01:00
|
|
|
DAG_id_tag_update(&scene->id, 0);
|
2012-11-02 09:41:26 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-18 07:11:54 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
static int rna_RenderSettings_active_view_index_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
|
|
|
|
return rd->actview;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_RenderSettings_active_view_index_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
|
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
|
|
|
|
rd->actview = value;
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static void rna_RenderSettings_active_view_index_range(
|
|
|
|
|
PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
|
2015-04-06 10:40:12 -03:00
|
|
|
{
|
|
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
|
|
|
|
|
|
|
|
|
*min = 0;
|
|
|
|
|
*max = max_ii(0, BLI_listbase_count(&rd->views) - 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static PointerRNA rna_RenderSettings_active_view_get(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
|
|
|
|
SceneRenderView *srv = BLI_findlink(&rd->views, rd->actview);
|
|
|
|
|
|
|
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_SceneRenderView, srv);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_RenderSettings_active_view_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
|
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
|
|
|
|
SceneRenderView *srv = (SceneRenderView *)value.data;
|
|
|
|
|
const int index = BLI_findindex(&rd->views, srv);
|
|
|
|
|
if (index != -1) rd->actview = index;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static SceneRenderView *rna_RenderView_new(ID *id, RenderData *UNUSED(rd), const char *name)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *)id;
|
|
|
|
|
SceneRenderView *srv = BKE_scene_add_render_view(scene, name);
|
|
|
|
|
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
return srv;
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static void rna_RenderView_remove(
|
|
|
|
|
ID *id, RenderData *UNUSED(rd), Main *UNUSED(bmain), ReportList *reports, PointerRNA *srv_ptr)
|
2015-04-06 10:40:12 -03:00
|
|
|
{
|
|
|
|
|
SceneRenderView *srv = srv_ptr->data;
|
|
|
|
|
Scene *scene = (Scene *)id;
|
|
|
|
|
|
|
|
|
|
if (!BKE_scene_remove_render_view(scene, srv)) {
|
|
|
|
|
BKE_reportf(reports, RPT_ERROR, "Render view '%s' could not be removed from scene '%s'",
|
|
|
|
|
srv->name, scene->id.name + 2);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_POINTER_INVALIDATE(srv_ptr);
|
|
|
|
|
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
2010-02-23 12:48:35 +00:00
|
|
|
static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
|
2009-07-21 20:28:32 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2012-03-05 23:30:41 +00:00
|
|
|
RenderEngineType *type = BLI_findlink(&R_engines, value);
|
2009-07-21 20:28:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (type)
|
2011-09-15 12:26:48 +00:00
|
|
|
BLI_strncpy_utf8(rd->engine, type->idname, sizeof(rd->engine));
|
2009-07-21 20:28:32 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static EnumPropertyItem *rna_RenderSettings_engine_itemf(
|
|
|
|
|
bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
|
2009-07-21 20:28:32 +00:00
|
|
|
{
|
|
|
|
|
RenderEngineType *type;
|
2012-03-05 23:30:41 +00:00
|
|
|
EnumPropertyItem *item = NULL;
|
2009-07-21 20:28:32 +00:00
|
|
|
EnumPropertyItem tmp = {0, "", 0, "", ""};
|
2012-03-05 23:30:41 +00:00
|
|
|
int a = 0, totitem = 0;
|
2009-07-21 20:28:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (type = R_engines.first; type; type = type->next, a++) {
|
|
|
|
|
tmp.value = a;
|
|
|
|
|
tmp.identifier = type->idname;
|
|
|
|
|
tmp.name = type->name;
|
2009-07-21 20:28:32 +00:00
|
|
|
RNA_enum_item_add(&item, &totitem, &tmp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_enum_item_end(&item, &totitem);
|
2014-01-04 18:08:43 +11:00
|
|
|
*r_free = true;
|
2009-07-21 20:28:32 +00:00
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|
|
2010-02-23 12:48:35 +00:00
|
|
|
static int rna_RenderSettings_engine_get(PointerRNA *ptr)
|
2009-07-21 20:28:32 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2009-07-21 20:28:32 +00:00
|
|
|
RenderEngineType *type;
|
2012-03-05 23:30:41 +00:00
|
|
|
int a = 0;
|
2009-01-15 02:36:24 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (type = R_engines.first; type; type = type->next, a++)
|
2015-01-26 16:03:11 +01:00
|
|
|
if (STREQ(type->idname, rd->engine))
|
2009-07-21 20:28:32 +00:00
|
|
|
return a;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2011-11-02 18:20:53 +00:00
|
|
|
static void rna_RenderSettings_engine_update(Main *bmain, Scene *UNUSED(unused), PointerRNA *UNUSED(ptr))
|
|
|
|
|
{
|
|
|
|
|
ED_render_engine_changed(bmain);
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_Scene_glsl_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2010-07-30 10:44:00 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2010-07-30 10:44:00 +00:00
|
|
|
|
2010-12-05 18:59:23 +00:00
|
|
|
DAG_id_tag_update(&scene->id, 0);
|
2010-07-30 10:44:00 +00:00
|
|
|
}
|
|
|
|
|
|
2014-06-06 00:56:04 +09:00
|
|
|
static void rna_Scene_freestyle_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
|
|
|
|
|
|
|
|
|
DAG_id_tag_update(&scene->id, 0);
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-02 19:24:16 +06:00
|
|
|
static void rna_Scene_use_view_map_cache_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
|
2014-01-28 23:24:59 +09:00
|
|
|
{
|
|
|
|
|
#ifdef WITH_FREESTYLE
|
|
|
|
|
FRS_free_view_map_cache();
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
|
|
|
|
SceneRenderLayer *rl = (SceneRenderLayer *)ptr->data;
|
2013-05-17 00:39:37 +00:00
|
|
|
char oldname[sizeof(rl->name)];
|
|
|
|
|
|
|
|
|
|
BLI_strncpy(oldname, rl->name, sizeof(rl->name));
|
|
|
|
|
|
2011-09-15 12:26:48 +00:00
|
|
|
BLI_strncpy_utf8(rl->name, value, sizeof(rl->name));
|
2013-03-25 08:29:06 +00:00
|
|
|
BLI_uniquename(&scene->r.layers, rl, DATA_("RenderLayer"), '.', offsetof(SceneRenderLayer, name), sizeof(rl->name));
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (scene->nodetree) {
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
bNode *node;
|
2012-03-05 23:30:41 +00:00
|
|
|
int index = BLI_findindex(&scene->r.layers, rl);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (node = scene->nodetree->nodes.first; node; node = node->next) {
|
|
|
|
|
if (node->type == CMP_NODE_R_LAYERS && node->id == NULL) {
|
|
|
|
|
if (node->custom1 == index)
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
BLI_strncpy(node->name, rl->name, NODE_MAXSTR);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-05-17 00:39:37 +00:00
|
|
|
|
|
|
|
|
/* fix all the animation data which may link to this */
|
2015-04-04 15:13:56 +11:00
|
|
|
BKE_animdata_fix_paths_rename_all(NULL, "render.layers", oldname, rl->name);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
}
|
2009-01-15 02:36:24 +00:00
|
|
|
|
2012-11-17 16:10:47 +00:00
|
|
|
static char *rna_SceneRenderLayer_path(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-12-28 14:19:05 +00:00
|
|
|
SceneRenderLayer *srl = (SceneRenderLayer *)ptr->data;
|
2013-04-23 20:10:22 +00:00
|
|
|
char name_esc[sizeof(srl->name) * 2];
|
|
|
|
|
|
|
|
|
|
BLI_strescape(name_esc, srl->name, sizeof(name_esc));
|
|
|
|
|
return BLI_sprintfN("render.layers[\"%s\"]", name_esc);
|
2012-11-17 16:10:47 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
static void rna_SceneRenderView_name_set(PointerRNA *ptr, const char *value)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
|
|
|
|
SceneRenderView *rv = (SceneRenderView *)ptr->data;
|
|
|
|
|
BLI_strncpy_utf8(rv->name, value, sizeof(rv->name));
|
|
|
|
|
BLI_uniquename(&scene->r.views, rv, DATA_("RenderView"), '.', offsetof(SceneRenderView, name), sizeof(rv->name));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static char *rna_SceneRenderView_path(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
SceneRenderView *srv = (SceneRenderView *)ptr->data;
|
|
|
|
|
return BLI_sprintfN("render.views[\"%s\"]", srv->name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_RenderSettings_views_format_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
|
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
|
|
|
|
|
|
|
|
|
if (rd->views_format == SCE_VIEWS_FORMAT_MULTIVIEW &&
|
|
|
|
|
value == SCE_VIEWS_FORMAT_STEREO_3D)
|
|
|
|
|
{
|
|
|
|
|
/* make sure the actview is visible */
|
|
|
|
|
if (rd->actview > 1) rd->actview = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rd->views_format = value;
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static int rna_RenderSettings_multiple_engines_get(PointerRNA *UNUSED(ptr))
|
2009-07-21 20:28:32 +00:00
|
|
|
{
|
2014-11-16 13:57:58 +01:00
|
|
|
return (BLI_listbase_count(&R_engines) > 1);
|
2009-07-21 20:28:32 +00:00
|
|
|
}
|
|
|
|
|
|
2011-11-02 19:24:30 +00:00
|
|
|
static int rna_RenderSettings_use_shading_nodes_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2012-05-05 14:33:36 +00:00
|
|
|
return BKE_scene_use_new_shading_nodes(scene);
|
2011-11-02 19:24:30 +00:00
|
|
|
}
|
|
|
|
|
|
2010-02-23 12:48:35 +00:00
|
|
|
static int rna_RenderSettings_use_game_engine_get(PointerRNA *ptr)
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
RenderData *rd = (RenderData *)ptr->data;
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
RenderEngineType *type;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (type = R_engines.first; type; type = type->next)
|
2015-01-26 16:03:11 +01:00
|
|
|
if (STREQ(type->idname, rd->engine))
|
2015-02-20 19:54:28 +11:00
|
|
|
return (type->flag & RE_GAME) != 0;
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2009-01-15 02:36:24 +00:00
|
|
|
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
SceneRenderLayer *rl = (SceneRenderLayer *)ptr->data;
|
2012-03-05 23:30:41 +00:00
|
|
|
rl->lay = ED_view3d_scene_layer_set(rl->lay, values, NULL);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
}
|
2009-01-15 02:36:24 +00:00
|
|
|
|
2012-03-28 09:07:35 +00:00
|
|
|
static void rna_SceneRenderLayer_pass_update(Main *bmain, Scene *activescene, PointerRNA *ptr)
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2009-01-15 02:36:24 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (scene->nodetree)
|
2013-06-12 11:26:44 +00:00
|
|
|
ntreeCompositForceHidden(scene->nodetree);
|
2012-03-28 09:07:35 +00:00
|
|
|
|
|
|
|
|
rna_Scene_glsl_update(bmain, activescene, ptr);
|
2009-01-15 02:36:24 +00:00
|
|
|
}
|
|
|
|
|
|
2013-03-18 16:34:57 +00:00
|
|
|
static void rna_Scene_use_nodes_update(bContext *C, PointerRNA *ptr)
|
2009-08-19 00:55:30 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2009-08-19 00:55:30 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (scene->use_nodes && scene->nodetree == NULL)
|
2013-03-18 16:34:57 +00:00
|
|
|
ED_node_composit_default(C, scene);
|
2009-08-19 00:55:30 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
Base *base;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (base = scene->base.first; base; base = base->next)
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
BKE_ptcache_object_reset(scene, base->object, PTCACHE_RESET_DEPSGRAPH);
|
|
|
|
|
}
|
2009-12-22 16:11:11 +00:00
|
|
|
|
|
|
|
|
static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
|
|
|
|
ToolSettings *ts = (ToolSettings *)ptr->data;
|
|
|
|
|
int flag = (value[0] ? SCE_SELECT_VERTEX : 0) | (value[1] ? SCE_SELECT_EDGE : 0) | (value[2] ? SCE_SELECT_FACE : 0);
|
2009-12-22 16:11:11 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (flag) {
|
2010-01-16 14:31:21 +00:00
|
|
|
ts->selectmode = flag;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (scene->basact) {
|
2012-05-05 16:03:57 +00:00
|
|
|
Mesh *me = BKE_mesh_from_object(scene->basact->object);
|
2012-03-05 23:30:41 +00:00
|
|
|
if (me && me->edit_btmesh && me->edit_btmesh->selectmode != flag) {
|
|
|
|
|
me->edit_btmesh->selectmode = flag;
|
2010-03-09 04:32:40 +00:00
|
|
|
EDBM_selectmode_set(me->edit_btmesh);
|
2010-01-16 14:31:21 +00:00
|
|
|
}
|
2009-12-22 16:11:11 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_Scene_editmesh_select_mode_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
|
2009-12-22 16:11:11 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Mesh *me = NULL;
|
2009-12-22 16:11:11 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (scene->basact) {
|
2012-05-05 16:03:57 +00:00
|
|
|
me = BKE_mesh_from_object(scene->basact->object);
|
2012-03-05 23:30:41 +00:00
|
|
|
if (me && me->edit_btmesh == NULL)
|
|
|
|
|
me = NULL;
|
2009-12-22 16:11:11 +00:00
|
|
|
}
|
|
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
WM_main_add_notifier(NC_GEOM | ND_SELECT, me);
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_TOOLSETTINGS, NULL);
|
2009-12-22 16:11:11 +00:00
|
|
|
}
|
|
|
|
|
|
2010-01-25 11:39:56 +00:00
|
|
|
static void object_simplify_update(Object *ob)
|
|
|
|
|
{
|
|
|
|
|
ModifierData *md;
|
2010-06-01 17:05:56 +00:00
|
|
|
ParticleSystem *psys;
|
2010-01-25 11:39:56 +00:00
|
|
|
|
Split id->flag in two, persistent flags and runtime tags.
This is purely internal sanitizing/cleanup, no change in behavior is expected at all.
This change was also needed because we were getting short on ID flags, and
future enhancement of 'user_one' ID behavior requires two new ones.
id->flag remains for persistent data (fakeuser only, so far!), this also allows us
100% backward & forward compatibility.
New id->tag is used for most flags. Though written in .blend files, its content
is cleared at read time.
Note that .blend file version was bumped, so that we can clear runtimeflags from
old .blends, important in case we add new persistent flags in future.
Also, behavior of tags (either status ones, or whether they need to be cleared before/after use)
has been added as comments to their declaration.
Reviewers: sergey, campbellbarton
Differential Revision: https://developer.blender.org/D1683
2015-12-27 11:53:50 +01:00
|
|
|
if ((ob->id.tag & LIB_TAG_DOIT) == 0) {
|
2013-06-11 11:21:16 +00:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
Split id->flag in two, persistent flags and runtime tags.
This is purely internal sanitizing/cleanup, no change in behavior is expected at all.
This change was also needed because we were getting short on ID flags, and
future enhancement of 'user_one' ID behavior requires two new ones.
id->flag remains for persistent data (fakeuser only, so far!), this also allows us
100% backward & forward compatibility.
New id->tag is used for most flags. Though written in .blend files, its content
is cleared at read time.
Note that .blend file version was bumped, so that we can clear runtimeflags from
old .blends, important in case we add new persistent flags in future.
Also, behavior of tags (either status ones, or whether they need to be cleared before/after use)
has been added as comments to their declaration.
Reviewers: sergey, campbellbarton
Differential Revision: https://developer.blender.org/D1683
2015-12-27 11:53:50 +01:00
|
|
|
ob->id.tag &= ~LIB_TAG_DOIT;
|
2013-06-11 11:21:16 +00:00
|
|
|
|
2012-10-22 19:00:15 +00:00
|
|
|
for (md = ob->modifiers.first; md; md = md->next) {
|
2014-07-20 01:30:29 +10:00
|
|
|
if (ELEM(md->type, eModifierType_Subsurf, eModifierType_Multires, eModifierType_ParticleSystem)) {
|
2012-10-22 19:00:15 +00:00
|
|
|
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
|
|
|
|
}
|
|
|
|
|
}
|
2010-06-01 17:05:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (psys = ob->particlesystem.first; psys; psys = psys->next)
|
2010-06-01 17:05:56 +00:00
|
|
|
psys->recalc |= PSYS_RECALC_CHILD;
|
2010-01-25 11:39:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (ob->dup_group) {
|
2010-01-25 11:39:56 +00:00
|
|
|
GroupObject *gob;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
for (gob = ob->dup_group->gobject.first; gob; gob = gob->next)
|
2010-01-25 11:39:56 +00:00
|
|
|
object_simplify_update(gob->ob);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2012-12-13 17:12:00 +00:00
|
|
|
static void rna_Scene_use_simplify_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
2010-01-25 11:39:56 +00:00
|
|
|
{
|
2012-12-13 17:12:00 +00:00
|
|
|
Scene *sce = ptr->id.data;
|
2010-12-17 15:37:59 +00:00
|
|
|
Scene *sce_iter;
|
2010-01-25 11:39:56 +00:00
|
|
|
Base *base;
|
|
|
|
|
|
2013-12-30 13:25:27 +11:00
|
|
|
BKE_main_id_tag_listbase(&bmain->object, true);
|
2012-12-13 17:12:00 +00:00
|
|
|
for (SETLOOPER(sce, sce_iter, base))
|
2010-01-25 11:39:56 +00:00
|
|
|
object_simplify_update(base->object);
|
|
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
WM_main_add_notifier(NC_GEOM | ND_DATA, NULL);
|
2010-01-25 11:39:56 +00:00
|
|
|
}
|
|
|
|
|
|
2012-12-13 17:12:00 +00:00
|
|
|
static void rna_Scene_simplify_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
2010-06-01 17:05:56 +00:00
|
|
|
{
|
2012-12-13 17:12:00 +00:00
|
|
|
Scene *sce = ptr->id.data;
|
|
|
|
|
|
|
|
|
|
if (sce->r.mode & R_SIMPLIFY)
|
|
|
|
|
rna_Scene_use_simplify_update(bmain, sce, ptr);
|
2010-06-01 17:05:56 +00:00
|
|
|
}
|
|
|
|
|
|
2013-09-20 06:35:28 +00:00
|
|
|
static void rna_Scene_use_persistent_data_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2012-11-09 23:54:58 +00:00
|
|
|
{
|
2012-12-13 17:12:00 +00:00
|
|
|
Scene *sce = ptr->id.data;
|
|
|
|
|
|
|
|
|
|
if (!(sce->r.mode & R_PERSISTENT_DATA))
|
2012-11-09 23:54:58 +00:00
|
|
|
RE_FreePersistentData();
|
|
|
|
|
}
|
|
|
|
|
|
2011-04-10 22:40:37 +00:00
|
|
|
static int rna_Scene_use_audio_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2015-02-20 19:54:28 +11:00
|
|
|
return (scene->audio.flag & AUDIO_MUTE) != 0;
|
2011-04-10 22:40:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Scene_use_audio_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2011-04-10 22:40:37 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (value)
|
2011-04-10 22:40:37 +00:00
|
|
|
scene->audio.flag |= AUDIO_MUTE;
|
|
|
|
|
else
|
|
|
|
|
scene->audio.flag &= ~AUDIO_MUTE;
|
|
|
|
|
|
2015-03-26 11:35:41 +01:00
|
|
|
BKE_sound_mute_scene(scene, value);
|
2011-04-10 22:40:37 +00:00
|
|
|
}
|
|
|
|
|
|
2010-02-19 12:20:29 +00:00
|
|
|
static int rna_Scene_sync_mode_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (scene->audio.flag & AUDIO_SYNC)
|
2010-02-19 12:20:29 +00:00
|
|
|
return AUDIO_SYNC;
|
|
|
|
|
return scene->flag & SCE_FRAME_DROP;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Scene_sync_mode_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->data;
|
2010-02-19 12:20:29 +00:00
|
|
|
|
2012-03-07 04:53:43 +00:00
|
|
|
if (value == AUDIO_SYNC) {
|
2010-02-19 12:20:29 +00:00
|
|
|
scene->audio.flag |= AUDIO_SYNC;
|
2012-03-07 04:53:43 +00:00
|
|
|
}
|
|
|
|
|
else if (value == SCE_FRAME_DROP) {
|
2010-02-19 12:20:29 +00:00
|
|
|
scene->audio.flag &= ~AUDIO_SYNC;
|
|
|
|
|
scene->flag |= SCE_FRAME_DROP;
|
|
|
|
|
}
|
2012-03-06 18:40:15 +00:00
|
|
|
else {
|
2010-02-19 12:20:29 +00:00
|
|
|
scene->audio.flag &= ~AUDIO_SYNC;
|
|
|
|
|
scene->flag &= ~SCE_FRAME_DROP;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static int rna_GameSettings_auto_start_get(PointerRNA *UNUSED(ptr))
|
2010-03-05 10:37:55 +00:00
|
|
|
{
|
2015-02-20 19:54:28 +11:00
|
|
|
return (G.fileflags & G_FILE_AUTOPLAY) != 0;
|
2010-03-05 10:37:55 +00:00
|
|
|
}
|
|
|
|
|
|
2011-05-31 02:14:25 +00:00
|
|
|
static void rna_GameSettings_auto_start_set(PointerRNA *UNUSED(ptr), int value)
|
2010-03-05 10:37:55 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
if (value)
|
2010-03-05 10:37:55 +00:00
|
|
|
G.fileflags |= G_FILE_AUTOPLAY;
|
|
|
|
|
else
|
|
|
|
|
G.fileflags &= ~G_FILE_AUTOPLAY;
|
|
|
|
|
}
|
|
|
|
|
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
static void rna_GameSettings_exit_key_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
GameData *gm = (GameData *)ptr->data;
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (ISKEYBOARD(value))
|
|
|
|
|
gm->exitkey = value;
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
}
|
2010-04-01 12:10:21 +00:00
|
|
|
|
2013-12-13 12:36:40 -02:00
|
|
|
static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[], int frame)
|
2010-04-01 12:10:21 +00:00
|
|
|
{
|
|
|
|
|
TimeMarker *marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
|
2012-03-05 23:30:41 +00:00
|
|
|
marker->flag = SELECT;
|
2013-12-13 12:36:40 -02:00
|
|
|
marker->frame = frame;
|
2011-09-15 12:26:48 +00:00
|
|
|
BLI_strncpy_utf8(marker->name, name, sizeof(marker->name));
|
2010-04-01 12:10:21 +00:00
|
|
|
BLI_addtail(&scene->markers, marker);
|
2011-11-23 16:12:11 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_MARKERS, NULL);
|
|
|
|
|
WM_main_add_notifier(NC_ANIMATION | ND_MARKERS, NULL);
|
2011-11-23 16:12:11 +00:00
|
|
|
|
2010-04-01 12:10:21 +00:00
|
|
|
return marker;
|
|
|
|
|
}
|
|
|
|
|
|
2012-11-02 09:41:26 +00:00
|
|
|
static void rna_TimeLine_remove(Scene *scene, ReportList *reports, PointerRNA *marker_ptr)
|
2010-04-01 12:10:21 +00:00
|
|
|
{
|
2012-11-02 09:41:26 +00:00
|
|
|
TimeMarker *marker = marker_ptr->data;
|
2014-04-01 11:34:00 +11:00
|
|
|
if (BLI_remlink_safe(&scene->markers, marker) == false) {
|
2012-12-24 17:40:47 +00:00
|
|
|
BKE_reportf(reports, RPT_ERROR, "Timeline marker '%s' not found in scene '%s'",
|
|
|
|
|
marker->name, scene->id.name + 2);
|
2010-04-01 12:10:21 +00:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MEM_freeN(marker);
|
2012-11-02 09:41:26 +00:00
|
|
|
RNA_POINTER_INVALIDATE(marker_ptr);
|
2011-11-23 16:12:11 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_MARKERS, NULL);
|
|
|
|
|
WM_main_add_notifier(NC_ANIMATION | ND_MARKERS, NULL);
|
2011-11-23 16:12:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_TimeLine_clear(Scene *scene)
|
|
|
|
|
{
|
|
|
|
|
BLI_freelistN(&scene->markers);
|
|
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_MARKERS, NULL);
|
|
|
|
|
WM_main_add_notifier(NC_ANIMATION | ND_MARKERS, NULL);
|
2010-04-01 12:10:21 +00:00
|
|
|
}
|
|
|
|
|
|
2012-03-08 14:04:06 +00:00
|
|
|
static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, const char idname[], const char name[])
|
2010-08-30 14:33:46 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
KeyingSet *ks = NULL;
|
2010-09-23 08:15:53 +00:00
|
|
|
|
2010-08-30 14:33:46 +00:00
|
|
|
/* call the API func, and set the active keyingset index */
|
2012-03-08 14:04:06 +00:00
|
|
|
ks = BKE_keyingset_add(&sce->keyingsets, idname, name, KEYINGSET_ABSOLUTE, 0);
|
2010-08-30 14:33:46 +00:00
|
|
|
|
|
|
|
|
if (ks) {
|
2014-11-16 13:57:58 +01:00
|
|
|
sce->active_keyingset = BLI_listbase_count(&sce->keyingsets);
|
2010-08-30 14:33:46 +00:00
|
|
|
return ks;
|
|
|
|
|
}
|
|
|
|
|
else {
|
2012-10-20 10:28:34 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, "Keying set could not be added");
|
2010-08-30 14:33:46 +00:00
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-10-21 18:08:20 +00:00
|
|
|
static void rna_UnifiedPaintSettings_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
|
|
|
|
|
{
|
|
|
|
|
Brush *br = BKE_paint_brush(BKE_paint_get_active(scene));
|
|
|
|
|
WM_main_add_notifier(NC_BRUSH | NA_EDITED, br);
|
|
|
|
|
}
|
|
|
|
|
|
2012-01-14 23:54:51 +00:00
|
|
|
static void rna_UnifiedPaintSettings_size_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
UnifiedPaintSettings *ups = ptr->data;
|
2012-01-14 23:54:51 +00:00
|
|
|
|
|
|
|
|
/* scale unprojected radius so it stays consistent with brush size */
|
2012-05-05 00:58:22 +00:00
|
|
|
BKE_brush_scale_unprojected_radius(&ups->unprojected_radius,
|
2012-05-10 15:22:29 +00:00
|
|
|
value, ups->size);
|
2012-03-05 23:30:41 +00:00
|
|
|
ups->size = value;
|
2012-01-14 23:54:51 +00:00
|
|
|
}
|
2011-09-18 17:10:28 +00:00
|
|
|
|
2012-01-14 23:54:51 +00:00
|
|
|
static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, float value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
UnifiedPaintSettings *ups = ptr->data;
|
2012-01-14 23:54:51 +00:00
|
|
|
|
|
|
|
|
/* scale brush size so it stays consistent with unprojected_radius */
|
2012-05-05 00:58:22 +00:00
|
|
|
BKE_brush_scale_size(&ups->size, value, ups->unprojected_radius);
|
2012-03-05 23:30:41 +00:00
|
|
|
ups->unprojected_radius = value;
|
2012-01-14 23:54:51 +00:00
|
|
|
}
|
2011-09-18 03:29:17 +00:00
|
|
|
|
2013-10-21 18:08:20 +00:00
|
|
|
static void rna_UnifiedPaintSettings_radius_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
2013-04-22 22:20:38 +00:00
|
|
|
{
|
2013-10-21 18:08:20 +00:00
|
|
|
/* changing the unified size should invalidate the overlay but also update the brush */
|
2013-04-22 22:20:38 +00:00
|
|
|
BKE_paint_invalidate_overlay_all();
|
2013-10-21 18:08:20 +00:00
|
|
|
rna_UnifiedPaintSettings_update(bmain, scene, ptr);
|
2013-04-22 22:20:38 +00:00
|
|
|
}
|
|
|
|
|
|
2013-09-20 06:35:28 +00:00
|
|
|
static char *rna_UnifiedPaintSettings_path(PointerRNA *UNUSED(ptr))
|
2013-01-22 03:11:11 +00:00
|
|
|
{
|
|
|
|
|
return BLI_strdup("tool_settings.unified_paint_settings");
|
|
|
|
|
}
|
|
|
|
|
|
2013-04-17 09:27:23 +00:00
|
|
|
/* generic function to recalc geometry */
|
|
|
|
|
static void rna_EditMesh_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
|
|
|
|
|
{
|
|
|
|
|
Mesh *me = NULL;
|
|
|
|
|
|
|
|
|
|
if (scene->basact) {
|
|
|
|
|
me = BKE_mesh_from_object(scene->basact->object);
|
|
|
|
|
if (me && me->edit_btmesh == NULL)
|
|
|
|
|
me = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (me) {
|
|
|
|
|
DAG_id_tag_update(&me->id, OB_RECALC_DATA);
|
|
|
|
|
WM_main_add_notifier(NC_GEOM | ND_DATA, me);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-20 06:35:28 +00:00
|
|
|
static char *rna_MeshStatVis_path(PointerRNA *UNUSED(ptr))
|
2013-04-17 09:27:23 +00:00
|
|
|
{
|
|
|
|
|
return BLI_strdup("tool_settings.statvis");
|
|
|
|
|
}
|
|
|
|
|
|
2011-09-18 03:29:17 +00:00
|
|
|
/* note: without this, when Multi-Paint is activated/deactivated, the colors
|
|
|
|
|
* will not change right away when multiple bones are selected, this function
|
|
|
|
|
* is not for general use and only for the few cases where changing scene
|
|
|
|
|
* settings and NOT for general purpose updates, possibly this should be
|
|
|
|
|
* given its own notifier. */
|
2011-10-26 21:30:08 +00:00
|
|
|
static void rna_Scene_update_active_object_data(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
|
2011-09-18 03:29:17 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Object *ob = OBACT;
|
|
|
|
|
if (ob) {
|
2011-09-18 03:29:17 +00:00
|
|
|
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
2012-05-10 15:22:29 +00:00
|
|
|
WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id);
|
2011-09-18 03:29:17 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-11-07 12:55:18 +00:00
|
|
|
static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2012-03-05 23:30:41 +00:00
|
|
|
Object *camera = scene->camera;
|
2011-11-07 12:55:18 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (camera)
|
2011-11-07 12:55:18 +00:00
|
|
|
DAG_id_tag_update(&camera->id, 0);
|
|
|
|
|
}
|
|
|
|
|
|
2012-10-23 12:25:08 +00:00
|
|
|
static void rna_SceneSequencer_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
|
|
|
|
|
{
|
|
|
|
|
BKE_sequencer_cache_cleanup();
|
|
|
|
|
BKE_sequencer_preprocessed_cache_cleanup();
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-20 06:35:28 +00:00
|
|
|
static char *rna_ToolSettings_path(PointerRNA *UNUSED(ptr))
|
2013-01-22 03:11:11 +00:00
|
|
|
{
|
|
|
|
|
return BLI_strdup("tool_settings");
|
|
|
|
|
}
|
|
|
|
|
|
2010-06-25 22:45:42 +00:00
|
|
|
static PointerRNA rna_FreestyleLineSet_linestyle_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-12-11 22:00:22 +00:00
|
|
|
FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data;
|
2010-06-25 22:45:42 +00:00
|
|
|
|
|
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineStyle, lineset->linestyle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_FreestyleLineSet_linestyle_set(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
2013-04-05 16:55:12 +00:00
|
|
|
FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data;
|
2010-06-25 22:45:42 +00:00
|
|
|
|
2013-09-30 23:02:29 +00:00
|
|
|
if (lineset->linestyle)
|
2015-11-09 19:47:10 +01:00
|
|
|
id_us_min(&lineset->linestyle->id);
|
2010-06-25 22:45:42 +00:00
|
|
|
lineset->linestyle = (FreestyleLineStyle *)value.data;
|
2015-11-09 19:47:10 +01:00
|
|
|
id_us_plus(&lineset->linestyle->id);
|
2010-06-25 22:45:42 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static FreestyleLineSet *rna_FreestyleSettings_lineset_add(
|
|
|
|
|
ID *id, FreestyleSettings *config, Main *bmain, const char *name)
|
2014-05-10 23:35:17 +09:00
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *)id;
|
2015-03-19 14:33:05 +11:00
|
|
|
FreestyleLineSet *lineset = BKE_freestyle_lineset_add(bmain, (FreestyleConfig *)config, name);
|
2014-05-10 23:35:17 +09:00
|
|
|
|
|
|
|
|
DAG_id_tag_update(&scene->id, 0);
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
return lineset;
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static void rna_FreestyleSettings_lineset_remove(
|
|
|
|
|
ID *id, FreestyleSettings *config, ReportList *reports, PointerRNA *lineset_ptr)
|
2014-05-10 23:35:17 +09:00
|
|
|
{
|
|
|
|
|
FreestyleLineSet *lineset = lineset_ptr->data;
|
|
|
|
|
Scene *scene = (Scene *)id;
|
|
|
|
|
|
|
|
|
|
if (!BKE_freestyle_lineset_delete((FreestyleConfig *)config, lineset)) {
|
|
|
|
|
BKE_reportf(reports, RPT_ERROR, "Line set '%s' could not be removed", lineset->name);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_POINTER_INVALIDATE(lineset_ptr);
|
|
|
|
|
|
|
|
|
|
DAG_id_tag_update(&scene->id, 0);
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
2010-06-25 22:45:42 +00:00
|
|
|
static PointerRNA rna_FreestyleSettings_active_lineset_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-12-11 22:00:22 +00:00
|
|
|
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
|
2013-03-23 03:00:37 +00:00
|
|
|
FreestyleLineSet *lineset = BKE_freestyle_lineset_get_active(config);
|
2010-06-25 22:45:42 +00:00
|
|
|
return rna_pointer_inherit_refine(ptr, &RNA_FreestyleLineSet, lineset);
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static void rna_FreestyleSettings_active_lineset_index_range(
|
|
|
|
|
PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
|
2010-06-25 22:45:42 +00:00
|
|
|
{
|
2012-12-08 22:24:41 +00:00
|
|
|
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
|
|
|
|
|
|
|
|
|
|
*min = 0;
|
2014-11-16 13:57:58 +01:00
|
|
|
*max = max_ii(0, BLI_listbase_count(&config->linesets) - 1);
|
2010-06-25 22:45:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rna_FreestyleSettings_active_lineset_index_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-12-11 22:00:22 +00:00
|
|
|
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
|
2013-03-23 03:00:37 +00:00
|
|
|
return BKE_freestyle_lineset_get_active_index(config);
|
2010-06-25 22:45:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_FreestyleSettings_active_lineset_index_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-12-11 22:00:22 +00:00
|
|
|
FreestyleConfig *config = (FreestyleConfig *)ptr->data;
|
2013-03-23 03:00:37 +00:00
|
|
|
BKE_freestyle_lineset_set_active_index(config, value);
|
2010-06-25 22:45:42 +00:00
|
|
|
}
|
|
|
|
|
|
2014-05-13 11:50:54 +09:00
|
|
|
static FreestyleModuleConfig *rna_FreestyleSettings_module_add(ID *id, FreestyleSettings *config)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *)id;
|
|
|
|
|
FreestyleModuleConfig *module = BKE_freestyle_module_add((FreestyleConfig *)config);
|
|
|
|
|
|
|
|
|
|
DAG_id_tag_update(&scene->id, 0);
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
return module;
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-06 20:43:34 +02:00
|
|
|
static void rna_FreestyleSettings_module_remove(
|
|
|
|
|
ID *id, FreestyleSettings *config, ReportList *reports, PointerRNA *module_ptr)
|
2014-05-13 11:50:54 +09:00
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *)id;
|
|
|
|
|
FreestyleModuleConfig *module = module_ptr->data;
|
|
|
|
|
|
|
|
|
|
if (!BKE_freestyle_module_delete((FreestyleConfig *)config, module)) {
|
|
|
|
|
if (module->script)
|
2014-05-14 06:37:56 +10:00
|
|
|
BKE_reportf(reports, RPT_ERROR, "Style module '%s' could not be removed", module->script->id.name + 2);
|
2014-05-13 11:50:54 +09:00
|
|
|
else
|
2015-04-13 21:00:06 +02:00
|
|
|
BKE_report(reports, RPT_ERROR, "Style module could not be removed");
|
2014-05-13 11:50:54 +09:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
RNA_POINTER_INVALIDATE(module_ptr);
|
|
|
|
|
|
|
|
|
|
DAG_id_tag_update(&scene->id, 0);
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-12 18:54:41 +01:00
|
|
|
char *rna_GPUDOF_path(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
/* if there is ID-data, resolve the path using the index instead of by name,
|
|
|
|
|
* since the name used is the name of the texture assigned, but the texture
|
|
|
|
|
* may be used multiple times in the same stack
|
|
|
|
|
*/
|
|
|
|
|
if (ptr->id.data) {
|
|
|
|
|
if (GS(((ID *)ptr->id.data)->name) == ID_CA) {
|
|
|
|
|
return BLI_strdup("gpu_dof");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-16 10:18:45 +10:00
|
|
|
return BLI_strdup("");
|
2015-02-12 18:54:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_GPUFXSettings_fx_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
GPUFXSettings *fx_settings = ptr->data;
|
|
|
|
|
|
|
|
|
|
BKE_screen_gpu_fx_validate(fx_settings);
|
|
|
|
|
}
|
|
|
|
|
|
2015-03-03 17:47:31 +01:00
|
|
|
static void rna_GPUDOFSettings_blades_set(PointerRNA *ptr, const int value)
|
|
|
|
|
{
|
|
|
|
|
GPUDOFSettings *dofsettings = (GPUDOFSettings *)ptr->data;
|
|
|
|
|
|
|
|
|
|
if (value < 3 && dofsettings->num_blades > 2)
|
|
|
|
|
dofsettings->num_blades = 0;
|
|
|
|
|
else if (value > 0 && dofsettings->num_blades == 0)
|
|
|
|
|
dofsettings->num_blades = 3;
|
|
|
|
|
else
|
|
|
|
|
dofsettings->num_blades = value;
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
static void rna_Stereo3dFormat_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
ID *id = ptr->id.data;
|
|
|
|
|
|
|
|
|
|
if (id && GS(id->name) == ID_IM) {
|
|
|
|
|
Image *ima = (Image *)id;
|
|
|
|
|
ImBuf *ibuf;
|
|
|
|
|
void *lock;
|
|
|
|
|
|
2015-10-11 01:14:02 +02:00
|
|
|
if (!BKE_image_is_stereo(ima))
|
2015-04-06 10:40:12 -03:00
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
|
|
|
|
|
|
|
|
|
|
if (ibuf) {
|
|
|
|
|
BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE);
|
|
|
|
|
}
|
|
|
|
|
BKE_image_release_ibuf(ima, ibuf, lock);
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-03-03 17:47:31 +01:00
|
|
|
|
2015-03-30 12:47:37 +02:00
|
|
|
static int rna_gpu_is_hq_supported_get(PointerRNA *UNUSED(ptr))
|
|
|
|
|
{
|
|
|
|
|
return GPU_instanced_drawing_support() && GPU_geometry_shader_support();
|
|
|
|
|
}
|
|
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
#else
|
|
|
|
|
|
2009-10-10 17:40:56 +00:00
|
|
|
static void rna_def_transform_orientation(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "TransformOrientation", NULL);
|
2009-10-10 17:40:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
|
2009-10-10 17:40:56 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "mat");
|
2013-10-10 20:14:04 +00:00
|
|
|
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_3x3);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
2009-10-10 17:40:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
2009-10-10 17:40:56 +00:00
|
|
|
RNA_def_struct_name_property(srna, prop);
|
2011-11-20 00:32:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Name", "Name of the custom transform orientation");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
2009-10-10 17:40:56 +00:00
|
|
|
}
|
|
|
|
|
|
2009-07-21 14:11:51 +00:00
|
|
|
static void rna_def_tool_settings(BlenderRNA *brna)
|
2009-01-17 16:58:05 +00:00
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2009-07-02 11:28:42 +00:00
|
|
|
static EnumPropertyItem uv_select_mode_items[] = {
|
2010-02-11 01:11:52 +00:00
|
|
|
{UV_SELECT_VERTEX, "VERTEX", ICON_UV_VERTEXSEL, "Vertex", "Vertex selection mode"},
|
|
|
|
|
{UV_SELECT_EDGE, "EDGE", ICON_UV_EDGESEL, "Edge", "Edge selection mode"},
|
|
|
|
|
{UV_SELECT_FACE, "FACE", ICON_UV_FACESEL, "Face", "Face selection mode"},
|
|
|
|
|
{UV_SELECT_ISLAND, "ISLAND", ICON_UV_ISLANDSEL, "Island", "Island selection mode"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2011-06-21 02:31:12 +00:00
|
|
|
|
2012-03-18 09:27:36 +00:00
|
|
|
/* the construction of this enum is quite special - everything is stored as bitflags,
|
|
|
|
|
* with 1st position only for for on/off (and exposed as boolean), while others are mutually
|
2011-06-21 02:31:12 +00:00
|
|
|
* exclusive options but which will only have any effect when autokey is enabled
|
|
|
|
|
*/
|
2009-08-16 16:15:13 +00:00
|
|
|
static EnumPropertyItem auto_key_items[] = {
|
2011-06-21 02:31:12 +00:00
|
|
|
{AUTOKEY_MODE_NORMAL & ~AUTOKEY_ON, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
|
|
|
|
|
{AUTOKEY_MODE_EDITKEYS & ~AUTOKEY_ON, "REPLACE_KEYS", 0, "Replace", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2009-10-20 00:45:51 +00:00
|
|
|
static EnumPropertyItem retarget_roll_items[] = {
|
2010-02-11 01:11:52 +00:00
|
|
|
{SK_RETARGET_ROLL_NONE, "NONE", 0, "None", "Don't adjust roll"},
|
|
|
|
|
{SK_RETARGET_ROLL_VIEW, "VIEW", 0, "View", "Roll bones to face the view"},
|
|
|
|
|
{SK_RETARGET_ROLL_JOINT, "JOINT", 0, "Joint", "Roll bone to original joint plane offset"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-10-20 00:45:51 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem sketch_convert_items[] = {
|
2010-02-11 01:11:52 +00:00
|
|
|
{SK_CONVERT_CUT_FIXED, "FIXED", 0, "Fixed", "Subdivide stroke in fixed number of bones"},
|
|
|
|
|
{SK_CONVERT_CUT_LENGTH, "LENGTH", 0, "Length", "Subdivide stroke in bones of specific length"},
|
2011-09-26 12:08:04 +00:00
|
|
|
{SK_CONVERT_CUT_ADAPTATIVE, "ADAPTIVE", 0, "Adaptive",
|
2012-05-10 15:22:29 +00:00
|
|
|
"Subdivide stroke adaptively, with more subdivision in curvier parts"},
|
2010-02-11 01:11:52 +00:00
|
|
|
{SK_CONVERT_RETARGET, "RETARGET", 0, "Retarget", "Retarget template bone chain to stroke"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2010-02-09 15:48:34 +00:00
|
|
|
static EnumPropertyItem edge_tag_items[] = {
|
|
|
|
|
{EDGE_MODE_SELECT, "SELECT", 0, "Select", ""},
|
|
|
|
|
{EDGE_MODE_TAG_SEAM, "SEAM", 0, "Tag Seam", ""},
|
|
|
|
|
{EDGE_MODE_TAG_SHARP, "SHARP", 0, "Tag Sharp", ""},
|
|
|
|
|
{EDGE_MODE_TAG_CREASE, "CREASE", 0, "Tag Crease", ""},
|
|
|
|
|
{EDGE_MODE_TAG_BEVEL, "BEVEL", 0, "Tag Bevel", ""},
|
2011-10-06 02:04:43 +00:00
|
|
|
{EDGE_MODE_TAG_FREESTYLE, "FREESTYLE", 0, "Tag Freestyle Edge Mark", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2013-02-22 04:09:04 +00:00
|
|
|
static EnumPropertyItem draw_groupuser_items[] = {
|
|
|
|
|
{OB_DRAW_GROUPUSER_NONE, "NONE", 0, "None", ""},
|
2013-02-25 19:16:04 +00:00
|
|
|
{OB_DRAW_GROUPUSER_ACTIVE, "ACTIVE", 0, "Active", "Show vertices with no weights in the active group"},
|
|
|
|
|
{OB_DRAW_GROUPUSER_ALL, "ALL", 0, "All", "Show vertices with no weights in any group"},
|
2013-02-22 04:09:04 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2013-06-23 15:37:08 +00:00
|
|
|
static EnumPropertyItem vertex_group_select_items[] = {
|
|
|
|
|
{WT_VGROUP_ALL, "ALL", 0, "All", "All Vertex Groups"},
|
|
|
|
|
{WT_VGROUP_BONE_DEFORM, "BONE_DEFORM", 0, "Deform", "Vertex Groups assigned to Deform Bones"},
|
|
|
|
|
{WT_VGROUP_BONE_DEFORM_OFF, "OTHER_DEFORM", 0, "Other", "Vertex Groups assigned to non Deform Bones"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2014-12-08 02:42:10 +13:00
|
|
|
|
|
|
|
|
static EnumPropertyItem gpencil_source_3d_items[] = {
|
2015-10-24 02:44:43 +11:00
|
|
|
{GP_TOOL_SOURCE_SCENE, "SCENE", 0, "Scene",
|
2015-04-06 20:43:34 +02:00
|
|
|
"Grease Pencil data attached to the current scene is used, "
|
2015-10-24 02:44:43 +11:00
|
|
|
"unless the active object already has Grease Pencil data (i.e. for old files)"},
|
2014-12-08 02:42:10 +13:00
|
|
|
{GP_TOOL_SOURCE_OBJECT, "OBJECT", 0, "Object",
|
2015-10-24 02:44:43 +11:00
|
|
|
"Grease Pencil data-blocks attached to the active object are used "
|
2015-12-13 21:03:13 +13:00
|
|
|
"(required when using pre 2.73 add-ons, e.g. BSurfaces)"},
|
2014-12-08 02:42:10 +13:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2015-12-13 21:03:13 +13:00
|
|
|
|
|
|
|
|
static EnumPropertyItem gpencil_stroke_placement_items[] = {
|
|
|
|
|
{GP_PROJECT_VIEWSPACE, "CURSOR", 0, "Cursor", "Draw stroke at the 3D cursor"},
|
|
|
|
|
{0, "VIEW", 0, "View", "Stick stroke to the view "}, /* weird, GP_PROJECT_VIEWALIGN is inverted */
|
|
|
|
|
{GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_VIEW, "SURFACE", 0, "Surface", "Stick stroke to surfaces"},
|
|
|
|
|
{GP_PROJECT_VIEWSPACE | GP_PROJECT_DEPTH_STROKE, "STROKE", 0, "Stroke", "Stick stroke to other strokes"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "ToolSettings", NULL);
|
2013-01-22 03:11:11 +00:00
|
|
|
RNA_def_struct_path_func(srna, "rna_ToolSettings_path");
|
2009-01-17 16:58:05 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Tool Settings", "");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE);
|
2009-01-17 16:58:05 +00:00
|
|
|
RNA_def_property_struct_type(prop, "Sculpt");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Sculpt", "");
|
2009-01-18 11:05:56 +00:00
|
|
|
|
2010-08-18 03:24:52 +00:00
|
|
|
prop = RNA_def_property(srna, "use_auto_normalize", PROP_BOOLEAN, PROP_NONE);
|
2009-10-30 02:09:52 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "auto_normalize", 1);
|
2011-09-18 15:20:10 +00:00
|
|
|
RNA_def_property_ui_text(prop, "WPaint Auto-Normalize",
|
|
|
|
|
"Ensure all bone-deforming vertex groups add up "
|
|
|
|
|
"to 1.0 while weight painting");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
|
2009-10-30 02:09:52 +00:00
|
|
|
|
2011-06-08 19:05:17 +00:00
|
|
|
prop = RNA_def_property(srna, "use_multipaint", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "multipaint", 1);
|
2011-09-18 03:29:17 +00:00
|
|
|
RNA_def_property_ui_text(prop, "WPaint Multi-Paint",
|
|
|
|
|
"Paint across all selected bones while "
|
|
|
|
|
"weight painting");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
|
2009-10-30 02:09:52 +00:00
|
|
|
|
2013-02-22 04:09:04 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_user", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "weightuser");
|
|
|
|
|
RNA_def_property_enum_items(prop, draw_groupuser_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mask Non-Group Vertices", "Display unweighted vertices (multi-paint overrides)");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
|
|
|
|
|
|
2013-06-23 15:37:08 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_subset", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "vgroupsubset");
|
|
|
|
|
RNA_def_property_enum_items(prop, vertex_group_select_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Subset", "Filter Vertex groups for Display");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
|
2013-02-22 04:09:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
|
2013-06-23 15:37:08 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "vpaint"); RNA_def_property_ui_text(prop, "Vertex Paint", "");
|
2009-01-17 16:58:05 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "weight_paint", PROP_POINTER, PROP_NONE);
|
2009-07-25 22:31:02 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "wpaint");
|
2009-07-19 17:44:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Weight Paint", "");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "image_paint", PROP_POINTER, PROP_NONE);
|
2009-07-25 22:31:02 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "imapaint");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Image Paint", "");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "uv_sculpt", PROP_POINTER, PROP_NONE);
|
2012-01-17 16:31:13 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "uvsculpt");
|
|
|
|
|
RNA_def_property_ui_text(prop, "UV Sculpt", "");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "particle_edit", PROP_POINTER, PROP_NONE);
|
2009-07-25 22:31:02 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "particle");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Particle Edit", "");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_uv_sculpt", PROP_BOOLEAN, PROP_NONE);
|
2012-01-17 16:31:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "use_uv_sculpt", 1);
|
2012-01-23 22:57:46 +00:00
|
|
|
RNA_def_property_ui_text(prop, "UV Sculpt", "Enable brush for UV sculpting");
|
2012-01-17 16:31:13 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_TPAINT_HLT, 0);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_uv_sculpt_update");
|
2012-01-17 16:31:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "uv_sculpt_lock_borders", PROP_BOOLEAN, PROP_NONE);
|
2012-01-17 16:31:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "uv_sculpt_settings", UV_SCULPT_LOCK_BORDERS);
|
2012-01-23 22:57:46 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lock Borders", "Disable editing of boundary edges");
|
2012-01-17 16:31:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "uv_sculpt_all_islands", PROP_BOOLEAN, PROP_NONE);
|
2012-01-17 16:31:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "uv_sculpt_settings", UV_SCULPT_ALL_ISLANDS);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Sculpt All Islands", "Brush operates on all islands");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "uv_sculpt_tool", PROP_ENUM, PROP_NONE);
|
2012-01-17 16:31:13 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "uv_sculpt_tool");
|
|
|
|
|
RNA_def_property_enum_items(prop, uv_sculpt_tool_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "UV Sculpt Tools", "Select Tools for the UV sculpt brushes");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "uv_relax_method", PROP_ENUM, PROP_NONE);
|
2012-01-17 16:31:13 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "uv_relax_method");
|
|
|
|
|
RNA_def_property_enum_items(prop, uv_sculpt_relaxation_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Relaxation Method", "Algorithm used for UV relaxation");
|
|
|
|
|
|
2009-07-02 11:28:42 +00:00
|
|
|
/* Transform */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "proportional_edit", PROP_ENUM, PROP_NONE);
|
2009-10-13 15:30:19 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "proportional");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_proportional_editing_items);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Proportional Editing",
|
|
|
|
|
"Proportional Editing mode, allows transforms with distance fall-off");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_proportional_edit_objects", PROP_BOOLEAN, PROP_NONE);
|
2010-07-31 19:26:21 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "proportional_objects", 0);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Proportional Editing Objects", "Proportional editing object mode");
|
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2010-07-31 19:26:21 +00:00
|
|
|
|
2012-06-04 16:42:58 +00:00
|
|
|
prop = RNA_def_property(srna, "use_proportional_edit_mask", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "proportional_mask", 0);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Proportional Editing Objects", "Proportional editing mask mode");
|
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
|
|
|
|
|
2015-04-09 18:29:58 +02:00
|
|
|
prop = RNA_def_property(srna, "use_proportional_action", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "proportional_action", 0);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Proportional Editing Actions", "Proportional editing in action editor");
|
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
|
|
|
|
|
2015-04-10 13:41:57 +10:00
|
|
|
prop = RNA_def_property(srna, "use_proportional_fcurve", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "proportional_fcurve", 0);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Proportional Editing FCurves", "Proportional editing in FCurve editor");
|
2015-04-09 18:29:58 +02:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
|
|
|
|
|
2015-04-15 14:51:17 +10:00
|
|
|
prop = RNA_def_property(srna, "lock_markers", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "lock_markers", 0);
|
2015-04-14 12:11:24 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Lock Markers", "Prevent marker editing");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "proportional_edit_falloff", PROP_ENUM, PROP_NONE);
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_proportional_falloff_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "proportional_size", PROP_FLOAT, PROP_DISTANCE);
|
2011-01-08 16:54:38 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "proportional_size");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Proportional Size", "Display size for proportional editing circle");
|
|
|
|
|
RNA_def_property_range(prop, 0.00001, 5000.0);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_DISTANCE);
|
2009-09-08 07:35:07 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "normalsize");
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view");
|
2009-09-08 07:35:07 +00:00
|
|
|
RNA_def_property_range(prop, 0.00001, 1000.0);
|
2010-02-07 01:09:12 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.01, 10.0, 10.0, 2);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_GEOM | ND_DATA, NULL);
|
2009-09-08 07:35:07 +00:00
|
|
|
|
2012-04-10 01:45:22 +00:00
|
|
|
prop = RNA_def_property(srna, "double_threshold", PROP_FLOAT, PROP_DISTANCE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "doublimit");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Double Threshold", "Limit for removing duplicates and 'Auto Merge'");
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 1.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0, 0.1, 0.01, 6);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_mesh_automerge", PROP_BOOLEAN, PROP_NONE);
|
2009-07-08 21:31:28 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "automerge", 0);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "AutoMerge Editing", "Automatically merge vertices moved to the same location");
|
2013-07-04 19:29:04 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2009-07-08 21:31:28 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_snap", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Snap", "Snap during transform");
|
2009-11-28 17:20:42 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_SNAP_OFF, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation with the snapping target");
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2015-06-30 18:57:17 +10:00
|
|
|
prop = RNA_def_property(srna, "use_snap_grid_absolute", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ABS_GRID);
|
2015-07-02 02:13:15 +10:00
|
|
|
RNA_def_property_ui_text(prop, "Absolute Grid Snap",
|
|
|
|
|
"Absolute grid alignment while translating (based on the pivot center)");
|
2015-09-05 23:02:54 +02:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_SNAP_GRID, 0);
|
2015-06-30 18:57:17 +10:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE);
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "snap_mode");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_snap_element_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2012-06-29 14:34:46 +00:00
|
|
|
|
|
|
|
|
/* node editor uses own set of snap modes */
|
|
|
|
|
prop = RNA_def_property(srna, "snap_node_element", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "snap_node_mode");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_snap_node_element_items);
|
2012-06-29 14:34:46 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Snap Node Element", "Type of element to snap to");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2012-12-03 12:03:16 +00:00
|
|
|
|
|
|
|
|
/* image editor uses own set of snap modes */
|
|
|
|
|
prop = RNA_def_property(srna, "snap_uv_element", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "snap_uv_mode");
|
|
|
|
|
RNA_def_property_enum_items(prop, snap_uv_element_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Snap UV Element", "Type of element to snap to");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "snap_target", PROP_ENUM, PROP_NONE);
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "snap_target");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_snap_target_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Snap Target", "Which part to snap onto the target");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_snap_peel_object", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center");
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2009-08-16 16:15:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_snap_project", PROP_BOOLEAN, PROP_NONE);
|
2009-10-12 22:33:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Project Individual Elements",
|
|
|
|
|
"Project individual elements on the surface of other objects");
|
2009-10-13 16:08:02 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2012-12-11 22:00:22 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_snap_self", PROP_BOOLEAN, PROP_NONE);
|
2011-07-27 07:22:31 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "snap_flag", SCE_SNAP_NO_SELF);
|
2011-09-29 14:41:11 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Project to Self", "Snap onto itself (editmode)");
|
2011-06-17 13:02:23 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_ORTHO, 0);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
2012-06-29 14:34:46 +00:00
|
|
|
|
Grease Pencil Todos: "Sketching Sessions"
Due to popular request and usability considerations, this commit
reintroduces functionality similar to 2.4's "Draw Mode" for Grease
Pencil.
In the toolbar under the Draw/Line/Eraser buttons, you can find the
"Use Sketching Sessions" toggle, which enables this feature. This is a
per-scene setting, and defaults to off, so that the current 2.5
behaviour is still the default (i.e. the Grease Pencil operator will
only do a single stroke at a time).
With this option enabled, drawing with Grease Pencil will enter a
semi-modal state where you can draw multiple strokes without needing
to keep holding the DKEY throughout (though you'll still need to do so
to start the strokes, unless you use some toolbar buttons), while
still being able to manipulate the viewport. Header help-text prints
show the appropriate keybindings (i.e. press ESCKEY or ENTER to end
the sketching session).
Notes:
- To aid maintainability of the 3D-View toolbar code, I've taken the
liberty to factor out the groups of widgets which commonly occur in
most of the toolbars into separate functions (namely "Repeat" and
"Grease Pencil"). Perhaps it might make it slightly harder to newbies
to the toolbar code to grasp, though the physics panels are far worse
;)
- I've reshuffled some code in the Grease Pencil code to separate out
the various states of operation again more clearly, though some more
work is still needed there (TODO)
- There can now be only one Grease Pencil operator running at a time
- Redoing Grease Pencil operations where sketching sessions was
enabled still needs work. Namely, a way of delimiting the set of
points recorded into strokes is still needed (TODO)
- Ultimately, it should be possible to switch tools midway through a
session. Currently sessions are limited to only being able to be used
with a single drawing mode (TODO)
- After ending a drawing session, the titlebar contols may not work on
Windows without manually making the main window lose focus and then
regain (i.e. click on some other window in toolbar, then come back).
This may be related to (bug #25480)
2011-01-04 03:14:01 +00:00
|
|
|
/* Grease Pencil */
|
2015-12-13 21:03:13 +13:00
|
|
|
prop = RNA_def_property(srna, "use_gpencil_continuous_drawing", PROP_BOOLEAN, PROP_NONE);
|
Grease Pencil Todos: "Sketching Sessions"
Due to popular request and usability considerations, this commit
reintroduces functionality similar to 2.4's "Draw Mode" for Grease
Pencil.
In the toolbar under the Draw/Line/Eraser buttons, you can find the
"Use Sketching Sessions" toggle, which enables this feature. This is a
per-scene setting, and defaults to off, so that the current 2.5
behaviour is still the default (i.e. the Grease Pencil operator will
only do a single stroke at a time).
With this option enabled, drawing with Grease Pencil will enter a
semi-modal state where you can draw multiple strokes without needing
to keep holding the DKEY throughout (though you'll still need to do so
to start the strokes, unless you use some toolbar buttons), while
still being able to manipulate the viewport. Header help-text prints
show the appropriate keybindings (i.e. press ESCKEY or ENTER to end
the sketching session).
Notes:
- To aid maintainability of the 3D-View toolbar code, I've taken the
liberty to factor out the groups of widgets which commonly occur in
most of the toolbars into separate functions (namely "Repeat" and
"Grease Pencil"). Perhaps it might make it slightly harder to newbies
to the toolbar code to grasp, though the physics panels are far worse
;)
- I've reshuffled some code in the Grease Pencil code to separate out
the various states of operation again more clearly, though some more
work is still needed there (TODO)
- There can now be only one Grease Pencil operator running at a time
- Redoing Grease Pencil operations where sketching sessions was
enabled still needs work. Namely, a way of delimiting the set of
points recorded into strokes is still needed (TODO)
- Ultimately, it should be possible to switch tools midway through a
session. Currently sessions are limited to only being able to be used
with a single drawing mode (TODO)
- After ending a drawing session, the titlebar contols may not work on
Windows without manually making the main window lose focus and then
regain (i.e. click on some other window in toolbar, then come back).
This may be related to (bug #25480)
2011-01-04 03:14:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_PAINTSESSIONS_ON);
|
2015-12-13 21:03:13 +13:00
|
|
|
RNA_def_property_ui_text(prop, "Use Continuous Drawing",
|
2012-03-18 09:27:36 +00:00
|
|
|
"Allow drawing multiple strokes at a time with Grease Pencil");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* xxx: need toolbar to be redrawn... */
|
Grease Pencil Todos: "Sketching Sessions"
Due to popular request and usability considerations, this commit
reintroduces functionality similar to 2.4's "Draw Mode" for Grease
Pencil.
In the toolbar under the Draw/Line/Eraser buttons, you can find the
"Use Sketching Sessions" toggle, which enables this feature. This is a
per-scene setting, and defaults to off, so that the current 2.5
behaviour is still the default (i.e. the Grease Pencil operator will
only do a single stroke at a time).
With this option enabled, drawing with Grease Pencil will enter a
semi-modal state where you can draw multiple strokes without needing
to keep holding the DKEY throughout (though you'll still need to do so
to start the strokes, unless you use some toolbar buttons), while
still being able to manipulate the viewport. Header help-text prints
show the appropriate keybindings (i.e. press ESCKEY or ENTER to end
the sketching session).
Notes:
- To aid maintainability of the 3D-View toolbar code, I've taken the
liberty to factor out the groups of widgets which commonly occur in
most of the toolbars into separate functions (namely "Repeat" and
"Grease Pencil"). Perhaps it might make it slightly harder to newbies
to the toolbar code to grasp, though the physics panels are far worse
;)
- I've reshuffled some code in the Grease Pencil code to separate out
the various states of operation again more clearly, though some more
work is still needed there (TODO)
- There can now be only one Grease Pencil operator running at a time
- Redoing Grease Pencil operations where sketching sessions was
enabled still needs work. Namely, a way of delimiting the set of
points recorded into strokes is still needed (TODO)
- Ultimately, it should be possible to switch tools midway through a
session. Currently sessions are limited to only being able to be used
with a single drawing mode (TODO)
- After ending a drawing session, the titlebar contols may not work on
Windows without manually making the main window lose focus and then
regain (i.e. click on some other window in toolbar, then come back).
This may be related to (bug #25480)
2011-01-04 03:14:01 +00:00
|
|
|
|
2015-12-13 21:03:13 +13:00
|
|
|
prop = RNA_def_property(srna, "use_gpencil_additive_drawing", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_RETAIN_LAST);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Additive Drawing",
|
|
|
|
|
"When creating new frames, the strokes from the previous/active frame "
|
|
|
|
|
"are included as the basis for the new one");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
|
|
|
|
|
|
2014-12-08 02:42:10 +13:00
|
|
|
prop = RNA_def_property(srna, "grease_pencil_source", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_src");
|
|
|
|
|
RNA_def_property_enum_items(prop, gpencil_source_3d_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Grease Pencil Source",
|
|
|
|
|
"Datablock where active Grease Pencil data is found from");
|
|
|
|
|
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
|
|
|
|
|
|
2015-12-13 21:03:13 +13:00
|
|
|
prop = RNA_def_property(srna, "gpencil_sculpt", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "gp_sculpt");
|
|
|
|
|
RNA_def_property_struct_type(prop, "GPencilSculptSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Grease Pencil Sculpt", "");
|
|
|
|
|
|
|
|
|
|
/* Grease Pencil - 3D View Stroke Placement */
|
|
|
|
|
prop = RNA_def_property(srna, "gpencil_stroke_placement_view3d", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v3d_align");
|
|
|
|
|
RNA_def_property_enum_items(prop, gpencil_stroke_placement_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stroke Placement (3D View)", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_gpencil_stroke_endpoints", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "gpencil_v3d_align", GP_PROJECT_DEPTH_STROKE_ENDPOINTS);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Only Endpoints", "Only use the first and last parts of the stroke for snapping");
|
|
|
|
|
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
|
|
|
|
|
|
|
|
|
|
/* Grease Pencil - 2D Views Stroke Placement */
|
|
|
|
|
prop = RNA_def_property(srna, "gpencil_stroke_placement_view2d", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v2d_align");
|
|
|
|
|
RNA_def_property_enum_items(prop, gpencil_stroke_placement_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stroke Placement (2D View)", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
|
|
|
|
|
|
|
|
|
|
/* Grease Pencil - Sequencer Preview Stroke Placement */
|
|
|
|
|
prop = RNA_def_property(srna, "gpencil_stroke_placement_sequencer_preview", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_seq_align");
|
|
|
|
|
RNA_def_property_enum_items(prop, gpencil_stroke_placement_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stroke Placement (Sequencer Preview)", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
|
|
|
|
|
|
|
|
|
|
/* Grease Pencil - Image Editor Stroke Placement */
|
|
|
|
|
prop = RNA_def_property(srna, "gpencil_stroke_placement_image_editor", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_ima_align");
|
|
|
|
|
RNA_def_property_enum_items(prop, gpencil_stroke_placement_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stroke Placement (Image Editor)", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
|
|
|
|
|
|
|
|
|
|
|
2009-08-16 16:15:13 +00:00
|
|
|
/* Auto Keying */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN, PROP_NONE);
|
2009-08-16 16:15:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones");
|
2010-05-03 03:33:20 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_REC, 0);
|
2009-08-16 16:15:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
|
2011-06-21 02:31:12 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "autokey_mode");
|
2009-08-16 16:15:13 +00:00
|
|
|
RNA_def_property_enum_items(prop, auto_key_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Auto-Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
|
2009-08-17 00:22:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_record_with_nla", PROP_BOOLEAN, PROP_NONE);
|
2009-08-17 00:22:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLAG_WITHNLA);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Layered",
|
|
|
|
|
"Add a new NLA Track + Strip for every loop/pass made over the animation "
|
|
|
|
|
"to allow non-destructive tweaking");
|
2011-02-04 08:33:07 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_keyframe_insert_keyingset", PROP_BOOLEAN, PROP_NONE);
|
2011-02-04 08:33:07 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_ONLYKEYINGSET);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Auto Keyframe Insert Keying Set",
|
|
|
|
|
"Automatic keyframe insertion using active Keying Set only");
|
2011-08-05 12:17:49 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_KEYINGSET, 0);
|
2011-02-04 08:33:07 +00:00
|
|
|
|
2009-07-02 11:28:42 +00:00
|
|
|
/* UV */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "uv_select_mode", PROP_ENUM, PROP_NONE);
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
|
|
|
|
|
RNA_def_property_enum_items(prop, uv_select_mode_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL);
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_uv_select_sync", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync");
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL);
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_uv_local_view", PROP_BOOLEAN, PROP_NONE);
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL);
|
2009-07-02 11:28:42 +00:00
|
|
|
|
|
|
|
|
/* Mesh */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "mesh_select_mode", PROP_BOOLEAN, PROP_NONE);
|
2009-12-22 16:11:11 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "selectmode", 1);
|
|
|
|
|
RNA_def_property_array(prop, 3);
|
|
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_editmesh_select_mode_set");
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Which mesh elements selection works on");
|
2009-12-22 16:11:11 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_editmesh_select_mode_update");
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_FACTOR);
|
2009-07-02 11:28:42 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups");
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2013-06-04 01:23:51 +00:00
|
|
|
/* use with MESH_OT_shortest_path_pick */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "edge_path_mode", PROP_ENUM, PROP_NONE);
|
2010-02-09 15:48:34 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "edge_mode");
|
|
|
|
|
RNA_def_property_enum_items(prop, edge_tag_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Edge Tag Mode", "The edge flag to tag when selecting the shortest path");
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "edge_path_live_unwrap", PROP_BOOLEAN, PROP_NONE);
|
2011-03-10 05:52:16 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "edge_mode_live_unwrap", 1);
|
2011-03-10 06:06:55 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Live Unwrap", "Changing edges seam re-calculates UV unwrap");
|
2011-03-10 05:52:16 +00:00
|
|
|
|
2009-10-20 00:45:51 +00:00
|
|
|
/* etch-a-ton */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_bone_sketching", PROP_BOOLEAN, PROP_NONE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bone_sketching", BONE_SKETCHING);
|
2013-01-29 02:00:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Bone Sketching", "Use sketching to create and edit bones");
|
2012-03-05 23:30:41 +00:00
|
|
|
/* RNA_def_property_ui_icon(prop, ICON_EDIT, 0); */
|
2013-01-29 03:04:24 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_etch_quick", PROP_BOOLEAN, PROP_NONE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bone_sketching", BONE_SKETCHING_QUICK);
|
2013-01-29 02:00:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Quick Sketching", "Automatically convert and delete on stroke end");
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_etch_overdraw", PROP_BOOLEAN, PROP_NONE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bone_sketching", BONE_SKETCHING_ADJUST);
|
2013-01-29 02:00:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Overdraw Sketching", "Adjust strokes by drawing near them");
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_etch_autoname", PROP_BOOLEAN, PROP_NONE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "skgen_retarget_options", SK_RETARGET_AUTONAME);
|
2015-04-06 20:43:34 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Autoname Bones",
|
|
|
|
|
"Automatically generate values to replace &N and &S suffix placeholders in template names");
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "etch_number", PROP_STRING, PROP_NONE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "skgen_num_string");
|
2013-01-29 02:00:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Number", "Text to replace &N with (e.g. 'Finger.&N' -> 'Finger.1' or 'Finger.One')");
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "etch_side", PROP_STRING, PROP_NONE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "skgen_num_string");
|
2013-01-29 02:00:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Side", "Text to replace &S with (e.g. 'Arm.&S' -> 'Arm.R' or 'Arm.Right')");
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "etch_template", PROP_POINTER, PROP_NONE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "skgen_template");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "Object");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_skgen_etch_template_set", NULL, NULL);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Template", "Template armature that will be retargeted to the stroke");
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "etch_subdivision_number", PROP_INT, PROP_NONE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "skgen_subdivision_number");
|
2010-11-21 03:45:35 +00:00
|
|
|
RNA_def_property_range(prop, 1, 255);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Subdivisions", "Number of bones in the subdivided stroke");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "etch_adaptive_limit", PROP_FLOAT, PROP_FACTOR);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "skgen_correlation_limit");
|
|
|
|
|
RNA_def_property_range(prop, 0.00001, 1.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.01, 1.0, 0.01, 2);
|
2013-01-29 02:00:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Limit", "Correlation threshold for number of bones in the subdivided stroke");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "etch_length_limit", PROP_FLOAT, PROP_DISTANCE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "skgen_length_limit");
|
|
|
|
|
RNA_def_property_range(prop, 0.00001, 100000.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
|
2013-01-29 02:00:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Length", "Maximum length of the subdivided bones");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "etch_roll_mode", PROP_ENUM, PROP_NONE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "skgen_retarget_roll");
|
|
|
|
|
RNA_def_property_enum_items(prop, retarget_roll_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Retarget roll mode", "Method used to adjust the roll of bones when retargeting");
|
2009-10-20 00:45:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "etch_convert_mode", PROP_ENUM, PROP_NONE);
|
2009-10-20 00:45:51 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bone_sketching_convert");
|
|
|
|
|
RNA_def_property_enum_items(prop, sketch_convert_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stroke conversion method", "Method used to convert stroke to bones");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
2010-07-22 18:56:46 +00:00
|
|
|
|
2012-01-12 17:22:32 +00:00
|
|
|
/* Unified Paint Settings */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "unified_paint_settings", PROP_POINTER, PROP_NONE);
|
2012-01-12 17:22:32 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "UnifiedPaintSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Unified Paint Settings", NULL);
|
2013-04-17 09:27:23 +00:00
|
|
|
|
|
|
|
|
/* Mesh Statistics */
|
|
|
|
|
prop = RNA_def_property(srna, "statvis", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "MeshStatVis");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mesh Statistics Visualization", NULL);
|
2012-01-12 17:22:32 +00:00
|
|
|
}
|
2010-07-22 18:56:46 +00:00
|
|
|
|
2012-01-12 17:22:32 +00:00
|
|
|
static void rna_def_unified_paint_settings(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
2010-07-22 18:56:46 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "UnifiedPaintSettings", NULL);
|
2013-01-22 03:11:11 +00:00
|
|
|
RNA_def_struct_path_func(srna, "rna_UnifiedPaintSettings_path");
|
2012-01-12 17:22:32 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Unified Paint Settings", "Overrides for some of the active brush's settings");
|
2010-07-22 18:56:46 +00:00
|
|
|
|
2012-01-12 21:48:08 +00:00
|
|
|
/* high-level flags to enable or disable unified paint settings */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_unified_size", PROP_BOOLEAN, PROP_NONE);
|
2012-01-12 18:08:07 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_SIZE);
|
2012-01-12 17:22:32 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Unified Radius",
|
|
|
|
|
"Instead of per-brush radius, the radius is shared across brushes");
|
2010-07-22 18:56:46 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_unified_strength", PROP_BOOLEAN, PROP_NONE);
|
2012-01-12 18:08:07 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_ALPHA);
|
2012-01-12 17:22:32 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Unified Strength",
|
|
|
|
|
"Instead of per-brush strength, the strength is shared across brushes");
|
2009-01-17 16:58:05 +00:00
|
|
|
|
2012-04-29 20:04:25 +00:00
|
|
|
prop = RNA_def_property(srna, "use_unified_weight", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_WEIGHT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Unified Weight",
|
|
|
|
|
"Instead of per-brush weight, the weight is shared across brushes");
|
|
|
|
|
|
2014-07-21 12:02:05 +02:00
|
|
|
prop = RNA_def_property(srna, "use_unified_color", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_COLOR);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Unified Color",
|
|
|
|
|
"Instead of per-brush color, the color is shared across brushes");
|
|
|
|
|
|
2012-01-12 21:48:08 +00:00
|
|
|
/* unified paint settings that override the equivalent settings
|
2012-04-22 11:54:53 +00:00
|
|
|
* from the active brush */
|
2013-12-13 04:39:15 +11:00
|
|
|
prop = RNA_def_property(srna, "size", PROP_INT, PROP_PIXEL);
|
2012-01-14 23:54:51 +00:00
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_UnifiedPaintSettings_size_set", NULL);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS * 10);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, -1);
|
2013-12-13 17:03:44 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Radius", "Radius of the brush");
|
2013-04-22 22:20:38 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_radius_update");
|
2012-01-12 21:48:08 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
|
2012-01-14 23:54:51 +00:00
|
|
|
RNA_def_property_float_funcs(prop, NULL, "rna_UnifiedPaintSettings_unprojected_radius_set", NULL);
|
2012-01-12 17:22:32 +00:00
|
|
|
RNA_def_property_range(prop, 0.001, FLT_MAX);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.001, 1, 0, -1);
|
2012-01-12 17:22:32 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Unprojected Radius", "Radius of brush in Blender units");
|
2013-04-22 22:20:38 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_radius_update");
|
2012-01-12 17:22:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
|
2012-01-12 17:22:32 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "alpha");
|
|
|
|
|
RNA_def_property_float_default(prop, 0.5f);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 10.0f);
|
2012-04-07 15:46:26 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
|
2012-01-12 17:22:32 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of the brush is when applied");
|
2013-10-21 18:08:20 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update");
|
2012-01-12 21:48:08 +00:00
|
|
|
|
2012-04-29 20:04:25 +00:00
|
|
|
prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "weight");
|
|
|
|
|
RNA_def_property_float_default(prop, 0.5f);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Weight", "Weight to assign in vertex groups");
|
2013-10-21 18:08:20 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update");
|
2012-04-29 20:04:25 +00:00
|
|
|
|
2014-07-21 12:02:05 +02:00
|
|
|
prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 1.0);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rgb");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Color", "");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "secondary_color", PROP_FLOAT, PROP_COLOR_GAMMA);
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 1.0);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "secondary_rgb");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Secondary Color", "");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NONE);
|
2012-01-12 21:48:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_SIZE_PRESSURE);
|
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure sensitivity for size");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PROP_NONE);
|
2012-01-12 21:48:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_ALPHA_PRESSURE);
|
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE);
|
2012-01-12 21:48:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_LOCK_SIZE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Blender Units",
|
|
|
|
|
"When locked brush stays same size relative to object; "
|
|
|
|
|
"when unlocked brush size is given in pixels");
|
2009-01-17 16:58:05 +00:00
|
|
|
}
|
|
|
|
|
|
2013-04-17 09:27:23 +00:00
|
|
|
static void rna_def_statvis(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem stat_type[] = {
|
|
|
|
|
{SCE_STATVIS_OVERHANG, "OVERHANG", 0, "Overhang", ""},
|
|
|
|
|
{SCE_STATVIS_THICKNESS, "THICKNESS", 0, "Thickness", ""},
|
|
|
|
|
{SCE_STATVIS_INTERSECT, "INTERSECT", 0, "Intersect", ""},
|
2013-09-30 05:50:41 +00:00
|
|
|
{SCE_STATVIS_DISTORT, "DISTORT", 0, "Distortion", ""},
|
|
|
|
|
{SCE_STATVIS_SHARP, "SHARP", 0, "Sharp", ""},
|
2013-04-17 09:27:23 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "MeshStatVis", NULL);
|
|
|
|
|
RNA_def_struct_path_func(srna, "rna_MeshStatVis_path");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Mesh Visualize Statistics", "");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_items(prop, stat_type);
|
2014-06-09 21:52:10 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Type", "Type of data to visualize/check");
|
2013-04-17 09:27:23 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* overhang */
|
|
|
|
|
prop = RNA_def_property(srna, "overhang_min", PROP_FLOAT, PROP_ANGLE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "overhang_min");
|
|
|
|
|
RNA_def_property_float_default(prop, 0.5f);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 0.001, 3);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Overhang Min", "Minimum angle to display");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "overhang_max", PROP_FLOAT, PROP_ANGLE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "overhang_max");
|
|
|
|
|
RNA_def_property_float_default(prop, 0.5f);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
|
2015-09-21 09:44:14 +10:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 3);
|
2013-04-17 09:27:23 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Overhang Max", "Maximum angle to display");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "overhang_axis", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "overhang_axis");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_object_axis_items);
|
2013-04-17 09:27:23 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Axis", "");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* thickness */
|
|
|
|
|
prop = RNA_def_property(srna, "thickness_min", PROP_FLOAT, PROP_DISTANCE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "thickness_min");
|
|
|
|
|
RNA_def_property_float_default(prop, 0.5f);
|
2013-04-18 17:23:02 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1000.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 100.0, 0.001, 3);
|
2013-04-17 09:27:23 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Thickness Min", "Minimum for measuring thickness");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "thickness_max", PROP_FLOAT, PROP_DISTANCE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "thickness_max");
|
|
|
|
|
RNA_def_property_float_default(prop, 0.5f);
|
2013-04-18 17:23:02 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1000.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 100.0, 0.001, 3);
|
2013-04-17 09:27:23 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Thickness Max", "Maximum for measuring thickness");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "thickness_samples", PROP_INT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "thickness_samples");
|
|
|
|
|
RNA_def_property_range(prop, 1, 32);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Samples", "Number of samples to test per face");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
2013-04-18 04:24:18 +00:00
|
|
|
|
2013-04-18 17:09:56 +00:00
|
|
|
/* distort */
|
2013-04-18 04:24:18 +00:00
|
|
|
prop = RNA_def_property(srna, "distort_min", PROP_FLOAT, PROP_ANGLE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "distort_min");
|
|
|
|
|
RNA_def_property_float_default(prop, 0.5f);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
|
2015-09-21 09:44:14 +10:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 3);
|
2013-04-18 04:24:18 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Distort Min", "Minimum angle to display");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "distort_max", PROP_FLOAT, PROP_ANGLE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "distort_max");
|
|
|
|
|
RNA_def_property_float_default(prop, 0.5f);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
|
2015-09-21 09:44:14 +10:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 3);
|
2013-04-18 04:24:18 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Distort Max", "Maximum angle to display");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
2013-04-18 17:09:56 +00:00
|
|
|
|
|
|
|
|
/* sharp */
|
|
|
|
|
prop = RNA_def_property(srna, "sharp_min", PROP_FLOAT, PROP_ANGLE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "sharp_min");
|
|
|
|
|
RNA_def_property_float_default(prop, 0.5f);
|
|
|
|
|
RNA_def_property_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f));
|
2015-09-21 09:44:14 +10:00
|
|
|
RNA_def_property_ui_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f), 10, 3);
|
2013-04-18 17:09:56 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Distort Min", "Minimum angle to display");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "sharp_max", PROP_FLOAT, PROP_ANGLE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "sharp_max");
|
|
|
|
|
RNA_def_property_float_default(prop, 0.5f);
|
|
|
|
|
RNA_def_property_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f));
|
2015-09-21 09:44:14 +10:00
|
|
|
RNA_def_property_ui_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f), 10, 3);
|
2013-04-18 17:09:56 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Distort Max", "Maximum angle to display");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_EditMesh_update");
|
2013-04-17 09:27:23 +00:00
|
|
|
}
|
|
|
|
|
|
2009-08-13 07:37:41 +00:00
|
|
|
static void rna_def_unit_settings(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem unit_systems[] = {
|
|
|
|
|
{USER_UNIT_NONE, "NONE", 0, "None", ""},
|
|
|
|
|
{USER_UNIT_METRIC, "METRIC", 0, "Metric", ""},
|
|
|
|
|
{USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2010-01-25 10:05:17 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem rotation_units[] = {
|
2011-09-25 09:55:13 +00:00
|
|
|
{0, "DEGREES", 0, "Degrees", "Use degrees for measuring angles and rotations"},
|
2010-01-25 10:05:17 +00:00
|
|
|
{USER_UNIT_ROT_RADIANS, "RADIANS", 0, "Radians", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-08-13 07:37:41 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "UnitSettings", NULL);
|
2009-08-13 07:37:41 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Unit Settings", "");
|
|
|
|
|
|
|
|
|
|
/* Units */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE);
|
2009-08-13 07:37:41 +00:00
|
|
|
RNA_def_property_enum_items(prop, unit_systems);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Unit System", "The unit system to use for button display");
|
2009-08-13 07:37:41 +00:00
|
|
|
RNA_def_property_update(prop, NC_WINDOW, NULL);
|
2010-11-18 14:10:09 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "system_rotation", PROP_ENUM, PROP_NONE);
|
2010-11-18 14:10:09 +00:00
|
|
|
RNA_def_property_enum_items(prop, rotation_units);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Rotation Units", "Unit to use for displaying/editing rotation values");
|
|
|
|
|
RNA_def_property_update(prop, NC_WINDOW, NULL);
|
2009-08-13 07:37:41 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Unit Scale", "Scale to use when converting between blender units and dimensions");
|
2009-08-13 07:37:41 +00:00
|
|
|
RNA_def_property_range(prop, 0.00001, 100000.0);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
|
|
|
|
|
RNA_def_property_update(prop, NC_WINDOW, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE);
|
2009-08-13 07:37:41 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_UNIT_OPT_SPLIT);
|
2012-03-02 21:14:37 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs (e.g. 1m 0cm)");
|
2009-08-13 07:37:41 +00:00
|
|
|
RNA_def_property_update(prop, NC_WINDOW, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
2009-07-21 14:11:51 +00:00
|
|
|
void rna_def_render_layer_common(StructRNA *srna, int scene)
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
|
|
|
|
if (scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderLayer_name_set");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_string_sdna(prop, NULL, "name");
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Name", "Render layer name");
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_struct_name_property(srna, prop);
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
|
|
|
|
|
RNA_def_property_struct_type(prop, "Material");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Material Override",
|
|
|
|
|
"Material to override all other materials in this render layer");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE);
|
2009-07-21 14:11:51 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "light_override");
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_struct_type(prop, "Group");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Light Override", "Group to override all other lights in this render layer");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
|
|
|
|
/* layers */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
|
|
|
|
|
RNA_def_property_array(prop, 20);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer");
|
2012-03-05 23:30:41 +00:00
|
|
|
if (scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_set");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2014-04-23 15:58:46 +02:00
|
|
|
/* this seems to be too much trouble with depsgraph updates/etc. currently (20140423) */
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "layers_zmask", PROP_BOOLEAN, PROP_LAYER);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1);
|
|
|
|
|
RNA_def_property_array(prop, 20);
|
KEYMAP REFACTORING
Diff Keymaps
User edited keymaps now no longer override the builtin keymaps entirely, but
rather save only the difference and reapply those changes. This means they can
stay better in sync when the builtin keymaps change. The diff/patch algorithm
is not perfect, but better for the common case where only a few items are changed
rather than entire keymaps The main weakness is that if a builtin keymap item
changes, user modification of that item may need to be redone in some cases.
Keymap Editor
The most noticeable change here is that there is no longer an "Edit" button for
keymaps, all are editable immediately, but a "Restore" buttons shows for keymaps
and items that have been edited. Shortcuts for addons can also be edited in the
keymap editor.
Addons
Addons now should only modify the new addon keyconfiguration, the keymap items
there will be added to the builtin ones for handling events, and not get lost
when starting new files. Example code of register/unregister:
km = wm.keyconfigs.addon.keymaps.new("3D View", space_type="VIEW_3D")
km.keymap_items.new('my.operator', 'ESC', 'PRESS')
km = wm.keyconfigs.addon.keymaps["3D View"]
km.keymap_items.remove(km.keymap_items["my.operator"])
Compatibility
The changes made are not forward compatible, i.e. if you save user preferences
with newer versions, older versions will not have key configuration changes that
were made.
2011-08-05 20:45:26 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers for solid faces");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
Cycles: merging features from tomato branch.
=== BVH build time optimizations ===
* BVH building was multithreaded. Not all building is multithreaded, packing
and the initial bounding/splitting is still single threaded, but recursive
splitting is, which was the main bottleneck.
* Object splitting now uses binning rather than sorting of all elements, using
code from the Embree raytracer from Intel.
http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/
* Other small changes to avoid allocations, pack memory more tightly, avoid
some unnecessary operations, ...
These optimizations do not work yet when Spatial Splits are enabled, for that
more work is needed. There's also other optimizations still needed, in
particular for the case of many low poly objects, the packing step and node
memory allocation.
BVH raytracing time should remain about the same, but BVH build time should be
significantly reduced, test here show speedup of about 5x to 10x on a dual core
and 5x to 25x on an 8-core machine, depending on the scene.
=== Threads ===
Centralized task scheduler for multithreading, which is basically the
CPU device threading code wrapped into something reusable.
Basic idea is that there is a single TaskScheduler that keeps a pool of threads,
one for each core. Other places in the code can then create a TaskPool that they
can drop Tasks in to be executed by the scheduler, and wait for them to complete
or cancel them early.
=== Normal ====
Added a Normal output to the texture coordinate node. This currently
gives the object space normal, which is the same under object animation.
In the future this might become a "generated" normal so it's also stable for
deforming objects, but for now it's already useful for non-deforming objects.
=== Render Layers ===
Per render layer Samples control, leaving it to 0 will use the common scene
setting.
Environment pass will now render environment even if film is set to transparent.
Exclude Layers" added. Scene layers (all object that influence the render,
directly or indirectly) are shared between all render layers. However sometimes
it's useful to leave out some object influence for a particular render layer.
That's what this option allows you to do.
=== Filter Glossy ===
When using a value higher than 0.0, this will blur glossy reflections after
blurry bounces, to reduce noise at the cost of accuracy. 1.0 is a good
starting value to tweak.
Some light paths have a low probability of being found while contributing much
light to the pixel. As a result these light paths will be found in some pixels
and not in others, causing fireflies. An example of such a difficult path might
be a small light that is causing a small specular highlight on a sharp glossy
material, which we are seeing through a rough glossy material. With path tracing
it is difficult to find the specular highlight, but if we increase the roughness
on the material the highlight gets bigger and softer, and so easier to find.
Often this blurring will be hardly noticeable, because we are seeing it through
a blurry material anyway, but there are also cases where this will lead to a
loss of detail in lighting.
2012-04-28 08:53:59 +00:00
|
|
|
prop = RNA_def_property(srna, "layers_exclude", PROP_BOOLEAN, PROP_LAYER);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "lay_exclude", 1);
|
|
|
|
|
RNA_def_property_array(prop, 20);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Exclude Layers", "Exclude scene layers from having any influence");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
Cycles: merging features from tomato branch.
=== BVH build time optimizations ===
* BVH building was multithreaded. Not all building is multithreaded, packing
and the initial bounding/splitting is still single threaded, but recursive
splitting is, which was the main bottleneck.
* Object splitting now uses binning rather than sorting of all elements, using
code from the Embree raytracer from Intel.
http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/
* Other small changes to avoid allocations, pack memory more tightly, avoid
some unnecessary operations, ...
These optimizations do not work yet when Spatial Splits are enabled, for that
more work is needed. There's also other optimizations still needed, in
particular for the case of many low poly objects, the packing step and node
memory allocation.
BVH raytracing time should remain about the same, but BVH build time should be
significantly reduced, test here show speedup of about 5x to 10x on a dual core
and 5x to 25x on an 8-core machine, depending on the scene.
=== Threads ===
Centralized task scheduler for multithreading, which is basically the
CPU device threading code wrapped into something reusable.
Basic idea is that there is a single TaskScheduler that keeps a pool of threads,
one for each core. Other places in the code can then create a TaskPool that they
can drop Tasks in to be executed by the scheduler, and wait for them to complete
or cancel them early.
=== Normal ====
Added a Normal output to the texture coordinate node. This currently
gives the object space normal, which is the same under object animation.
In the future this might become a "generated" normal so it's also stable for
deforming objects, but for now it's already useful for non-deforming objects.
=== Render Layers ===
Per render layer Samples control, leaving it to 0 will use the common scene
setting.
Environment pass will now render environment even if film is set to transparent.
Exclude Layers" added. Scene layers (all object that influence the render,
directly or indirectly) are shared between all render layers. However sometimes
it's useful to leave out some object influence for a particular render layer.
That's what this option allows you to do.
=== Filter Glossy ===
When using a value higher than 0.0, this will blur glossy reflections after
blurry bounces, to reduce noise at the cost of accuracy. 1.0 is a good
starting value to tweak.
Some light paths have a low probability of being found while contributing much
light to the pixel. As a result these light paths will be found in some pixels
and not in others, causing fireflies. An example of such a difficult path might
be a small light that is causing a small specular highlight on a sharp glossy
material, which we are seeing through a rough glossy material. With path tracing
it is difficult to find the specular highlight, but if we increase the roughness
on the material the highlight gets bigger and softer, and so easier to find.
Often this blurring will be hardly noticeable, because we are seeing it through
a blurry material anyway, but there are also cases where this will lead to a
loss of detail in lighting.
2012-04-28 08:53:59 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-05-01 20:08:23 +00:00
|
|
|
if (scene) {
|
Cycles: merging features from tomato branch.
=== BVH build time optimizations ===
* BVH building was multithreaded. Not all building is multithreaded, packing
and the initial bounding/splitting is still single threaded, but recursive
splitting is, which was the main bottleneck.
* Object splitting now uses binning rather than sorting of all elements, using
code from the Embree raytracer from Intel.
http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/
* Other small changes to avoid allocations, pack memory more tightly, avoid
some unnecessary operations, ...
These optimizations do not work yet when Spatial Splits are enabled, for that
more work is needed. There's also other optimizations still needed, in
particular for the case of many low poly objects, the packing step and node
memory allocation.
BVH raytracing time should remain about the same, but BVH build time should be
significantly reduced, test here show speedup of about 5x to 10x on a dual core
and 5x to 25x on an 8-core machine, depending on the scene.
=== Threads ===
Centralized task scheduler for multithreading, which is basically the
CPU device threading code wrapped into something reusable.
Basic idea is that there is a single TaskScheduler that keeps a pool of threads,
one for each core. Other places in the code can then create a TaskPool that they
can drop Tasks in to be executed by the scheduler, and wait for them to complete
or cancel them early.
=== Normal ====
Added a Normal output to the texture coordinate node. This currently
gives the object space normal, which is the same under object animation.
In the future this might become a "generated" normal so it's also stable for
deforming objects, but for now it's already useful for non-deforming objects.
=== Render Layers ===
Per render layer Samples control, leaving it to 0 will use the common scene
setting.
Environment pass will now render environment even if film is set to transparent.
Exclude Layers" added. Scene layers (all object that influence the render,
directly or indirectly) are shared between all render layers. However sometimes
it's useful to leave out some object influence for a particular render layer.
That's what this option allows you to do.
=== Filter Glossy ===
When using a value higher than 0.0, this will blur glossy reflections after
blurry bounces, to reduce noise at the cost of accuracy. 1.0 is a good
starting value to tweak.
Some light paths have a low probability of being found while contributing much
light to the pixel. As a result these light paths will be found in some pixels
and not in others, causing fireflies. An example of such a difficult path might
be a small light that is causing a small specular highlight on a sharp glossy
material, which we are seeing through a rough glossy material. With path tracing
it is difficult to find the specular highlight, but if we increase the roughness
on the material the highlight gets bigger and softer, and so easier to find.
Often this blurring will be hardly noticeable, because we are seeing it through
a blurry material anyway, but there are also cases where this will lead to a
loss of detail in lighting.
2012-04-28 08:53:59 +00:00
|
|
|
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_UNSIGNED);
|
2012-12-24 17:40:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Samples", "Override number of render samples for this render layer, "
|
|
|
|
|
"0 will use the scene setting");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2014-02-06 15:18:34 +01:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "pass_alpha_threshold", PROP_FLOAT, PROP_FACTOR);
|
2014-02-12 15:55:58 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Alpha Threshold",
|
|
|
|
|
"Z, Index, normal, UV and vector passes are only affected by surfaces with "
|
|
|
|
|
"alpha transparency equal to or higher than this threshold");
|
2014-02-06 15:18:34 +01:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
Cycles: merging features from tomato branch.
=== BVH build time optimizations ===
* BVH building was multithreaded. Not all building is multithreaded, packing
and the initial bounding/splitting is still single threaded, but recursive
splitting is, which was the main bottleneck.
* Object splitting now uses binning rather than sorting of all elements, using
code from the Embree raytracer from Intel.
http://software.intel.com/en-us/articles/embree-photo-realistic-ray-tracing-kernels/
* Other small changes to avoid allocations, pack memory more tightly, avoid
some unnecessary operations, ...
These optimizations do not work yet when Spatial Splits are enabled, for that
more work is needed. There's also other optimizations still needed, in
particular for the case of many low poly objects, the packing step and node
memory allocation.
BVH raytracing time should remain about the same, but BVH build time should be
significantly reduced, test here show speedup of about 5x to 10x on a dual core
and 5x to 25x on an 8-core machine, depending on the scene.
=== Threads ===
Centralized task scheduler for multithreading, which is basically the
CPU device threading code wrapped into something reusable.
Basic idea is that there is a single TaskScheduler that keeps a pool of threads,
one for each core. Other places in the code can then create a TaskPool that they
can drop Tasks in to be executed by the scheduler, and wait for them to complete
or cancel them early.
=== Normal ====
Added a Normal output to the texture coordinate node. This currently
gives the object space normal, which is the same under object animation.
In the future this might become a "generated" normal so it's also stable for
deforming objects, but for now it's already useful for non-deforming objects.
=== Render Layers ===
Per render layer Samples control, leaving it to 0 will use the common scene
setting.
Environment pass will now render environment even if film is set to transparent.
Exclude Layers" added. Scene layers (all object that influence the render,
directly or indirectly) are shared between all render layers. However sometimes
it's useful to leave out some object influence for a particular render layer.
That's what this option allows you to do.
=== Filter Glossy ===
When using a value higher than 0.0, this will blur glossy reflections after
blurry bounces, to reduce noise at the cost of accuracy. 1.0 is a good
starting value to tweak.
Some light paths have a low probability of being found while contributing much
light to the pixel. As a result these light paths will be found in some pixels
and not in others, causing fireflies. An example of such a difficult path might
be a small light that is causing a small specular highlight on a sharp glossy
material, which we are seeing through a rough glossy material. With path tracing
it is difficult to find the specular highlight, but if we increase the roughness
on the material the highlight gets bigger and softer, and so easier to find.
Often this blurring will be hardly noticeable, because we are seeing it through
a blurry material anyway, but there are also cases where this will lead to a
loss of detail in lighting.
2012-04-28 08:53:59 +00:00
|
|
|
}
|
|
|
|
|
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
/* layer options */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DISABLE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render layer");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Zmask Negate",
|
|
|
|
|
"For Zmask, only render what is behind solid z values instead of in front");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_all_z", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_solid", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE);
|
2009-07-18 15:14:59 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid)");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_ztransp", PROP_BOOLEAN, PROP_NONE);
|
2009-07-18 15:14:59 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
|
2011-09-25 09:55:13 +00:00
|
|
|
RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in this Layer (on top of Solid and Halos)");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
|
2009-07-18 15:14:59 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2015-11-24 13:21:40 +05:00
|
|
|
prop = RNA_def_property(srna, "use_ao", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_AO);
|
|
|
|
|
RNA_def_property_ui_text(prop, "AO", "Render AO in this Layer");
|
|
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
|
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2014-01-27 19:58:54 +01:00
|
|
|
prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Layer (only works for Solid faces)");
|
|
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE);
|
2009-07-18 15:14:59 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_FRS);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Freestyle", "Render stylized strokes in this Layer");
|
2014-06-06 00:56:04 +09:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2014-03-09 22:24:33 +09:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2009-10-07 05:16:23 +00:00
|
|
|
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
/* passes */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_z", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_vector", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_normal", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_uv", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_mist", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.0)");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_object_index", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, PROP_NONE);
|
2011-07-04 19:22:37 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXMA);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Material Index", "Deliver material index pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2011-07-04 19:22:37 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2011-07-04 18:14:41 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_diffuse", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_specular", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_shadow", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "AO", "Deliver AO pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_reflection", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Reflection", "Deliver raytraced reflection pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_refraction", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Refraction", "Deliver raytraced refraction pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE);
|
2010-01-27 21:40:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_EMIT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Emit", "Deliver emission pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2010-01-27 21:40:08 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_environment", PROP_BOOLEAN, PROP_NONE);
|
2010-01-27 21:40:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_ENVIRONMENT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Environment", "Deliver environment lighting pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2010-01-27 21:40:08 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_indirect", PROP_BOOLEAN, PROP_NONE);
|
2010-01-27 21:40:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDIRECT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Indirect", "Deliver indirect lighting pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2010-01-27 21:40:08 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_specular", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pass from combined");
|
2010-04-23 06:33:30 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_shadow", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass from combined");
|
2010-04-23 06:33:30 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combined");
|
2010-04-23 06:33:30 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_reflection", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude raytraced reflection pass from combined");
|
2010-04-23 06:33:30 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_refraction", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude raytraced refraction pass from combined");
|
2010-04-23 06:33:30 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2009-07-21 14:11:51 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-01-27 21:40:08 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_emit", PROP_BOOLEAN, PROP_NONE);
|
2010-01-27 21:40:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_EMIT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Emit Exclude", "Exclude emission pass from combined");
|
2010-04-23 06:33:30 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2010-01-27 21:40:08 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_environment", PROP_BOOLEAN, PROP_NONE);
|
2010-01-27 21:40:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_ENVIRONMENT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Environment Exclude", "Exclude environment pass from combined");
|
2010-04-23 06:33:30 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2010-01-27 21:40:08 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_indirect", PROP_BOOLEAN, PROP_NONE);
|
2010-01-27 21:40:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_INDIRECT);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Indirect Exclude", "Exclude indirect pass from combined");
|
2010-04-23 06:33:30 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
2010-01-27 21:40:08 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_diffuse_direct", PROP_BOOLEAN, PROP_NONE);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_DIRECT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Diffuse Direct", "Deliver diffuse direct pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_diffuse_indirect", PROP_BOOLEAN, PROP_NONE);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_INDIRECT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Diffuse Indirect", "Deliver diffuse indirect pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_diffuse_color", PROP_BOOLEAN, PROP_NONE);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_COLOR);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Diffuse Color", "Deliver diffuse color pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_glossy_direct", PROP_BOOLEAN, PROP_NONE);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_DIRECT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Glossy Direct", "Deliver glossy direct pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_glossy_indirect", PROP_BOOLEAN, PROP_NONE);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_INDIRECT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Glossy Indirect", "Deliver glossy indirect pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_glossy_color", PROP_BOOLEAN, PROP_NONE);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_COLOR);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Glossy Color", "Deliver glossy color pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_transmission_direct", PROP_BOOLEAN, PROP_NONE);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_DIRECT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Transmission Direct", "Deliver transmission direct pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_transmission_indirect", PROP_BOOLEAN, PROP_NONE);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_INDIRECT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Transmission Indirect", "Deliver transmission indirect pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_pass_transmission_color", PROP_BOOLEAN, PROP_NONE);
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_COLOR);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Transmission Color", "Deliver transmission color pass");
|
2012-05-10 15:22:29 +00:00
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
Diffuse/Glossy/Transmission x Direct/Indirect/Color
Not supported yet:
* UV, Vector, Mist
Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2013-08-03 13:12:09 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_pass_subsurface_direct", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFACE_DIRECT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Subsurface Direct", "Deliver subsurface direct pass");
|
|
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
|
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_pass_subsurface_indirect", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFACE_INDIRECT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Subsurface Indirect", "Deliver subsurface indirect pass");
|
|
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
|
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_pass_subsurface_color", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFACE_COLOR);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Subsurface Color", "Deliver subsurface color pass");
|
|
|
|
|
if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneRenderLayer_pass_update");
|
|
|
|
|
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
}
|
|
|
|
|
|
2014-05-13 11:50:54 +09:00
|
|
|
static void rna_def_freestyle_modules(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
FunctionRNA *func;
|
|
|
|
|
PropertyRNA *parm;
|
|
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "FreestyleModules");
|
|
|
|
|
srna = RNA_def_struct(brna, "FreestyleModules", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "FreestyleSettings");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Style Modules", "A list of style modules (to be applied from top to bottom)");
|
|
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "new", "rna_FreestyleSettings_module_add");
|
|
|
|
|
RNA_def_function_ui_description(func, "Add a style module to scene render layer Freestyle settings");
|
|
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
|
|
|
|
parm = RNA_def_pointer(func, "module", "FreestyleModuleSettings", "", "Newly created style module");
|
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "remove", "rna_FreestyleSettings_module_remove");
|
|
|
|
|
RNA_def_function_ui_description(func, "Remove a style module from scene render layer Freestyle settings");
|
|
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
|
|
|
|
|
parm = RNA_def_pointer(func, "module", "FreestyleModuleSettings", "", "Style module to remove");
|
|
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
|
|
|
|
|
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
|
|
|
|
|
}
|
|
|
|
|
|
2010-08-28 15:10:37 +00:00
|
|
|
static void rna_def_freestyle_linesets(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
2014-05-10 23:35:17 +09:00
|
|
|
FunctionRNA *func;
|
|
|
|
|
PropertyRNA *parm;
|
2010-08-28 15:10:37 +00:00
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "Linesets");
|
2012-12-11 22:00:22 +00:00
|
|
|
srna = RNA_def_struct(brna, "Linesets", NULL);
|
2010-11-29 21:32:47 +00:00
|
|
|
RNA_def_struct_sdna(srna, "FreestyleSettings");
|
2010-08-28 15:10:37 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Line Sets", "Line sets for associating lines and style parameters");
|
|
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
|
2010-08-28 15:10:37 +00:00
|
|
|
RNA_def_property_struct_type(prop, "FreestyleLineSet");
|
|
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_FreestyleSettings_active_lineset_get", NULL, NULL, NULL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Active Line Set", "Active line set being displayed");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2010-08-28 15:10:37 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_int_funcs(prop, "rna_FreestyleSettings_active_lineset_index_get",
|
|
|
|
|
"rna_FreestyleSettings_active_lineset_index_set",
|
|
|
|
|
"rna_FreestyleSettings_active_lineset_index_range");
|
2010-08-28 15:10:37 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Line Set Index", "Index of active line set slot");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2014-05-10 23:35:17 +09:00
|
|
|
|
2014-05-13 10:28:47 +09:00
|
|
|
func = RNA_def_function(srna, "new", "rna_FreestyleSettings_lineset_add");
|
2014-05-10 23:35:17 +09:00
|
|
|
RNA_def_function_ui_description(func, "Add a line set to scene render layer Freestyle settings");
|
2015-03-19 14:33:05 +11:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_SELF_ID);
|
2014-05-10 23:35:17 +09:00
|
|
|
parm = RNA_def_string(func, "name", "LineSet", 0, "", "New name for the line set (not unique)");
|
|
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
|
|
|
|
parm = RNA_def_pointer(func, "lineset", "FreestyleLineSet", "", "Newly created line set");
|
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
2014-05-13 10:28:47 +09:00
|
|
|
func = RNA_def_function(srna, "remove", "rna_FreestyleSettings_lineset_remove");
|
2014-05-10 23:35:17 +09:00
|
|
|
RNA_def_function_ui_description(func, "Remove a line set from scene render layer Freestyle settings");
|
|
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
|
|
|
|
|
parm = RNA_def_pointer(func, "lineset", "FreestyleLineSet", "", "Line set to remove");
|
|
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
|
|
|
|
|
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
|
2010-08-28 15:10:37 +00:00
|
|
|
}
|
|
|
|
|
|
2009-10-07 05:16:23 +00:00
|
|
|
static void rna_def_freestyle_settings(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2010-12-02 23:50:10 +00:00
|
|
|
static EnumPropertyItem edge_type_negation_items[] = {
|
2011-10-30 09:05:47 +00:00
|
|
|
{0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given edge type conditions"},
|
2012-12-11 22:00:22 +00:00
|
|
|
{FREESTYLE_LINESET_FE_NOT, "EXCLUSIVE", 0, "Exclusive",
|
|
|
|
|
"Select feature edges not satisfying the given edge type conditions"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2010-07-05 22:32:51 +00:00
|
|
|
|
2010-12-02 23:50:10 +00:00
|
|
|
static EnumPropertyItem edge_type_combination_items[] = {
|
2014-04-24 23:22:21 +09:00
|
|
|
{0, "OR", 0, "Logical OR", "Select feature edges satisfying at least one of edge type conditions"},
|
2012-12-11 22:00:22 +00:00
|
|
|
{FREESTYLE_LINESET_FE_AND, "AND", 0, "Logical AND",
|
2014-04-24 23:22:21 +09:00
|
|
|
"Select feature edges satisfying all edge type conditions"},
|
2012-12-11 22:00:22 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2010-07-05 22:32:51 +00:00
|
|
|
|
2010-12-02 23:50:10 +00:00
|
|
|
static EnumPropertyItem group_negation_items[] = {
|
2011-10-30 09:05:47 +00:00
|
|
|
{0, "INCLUSIVE", 0, "Inclusive", "Select feature edges belonging to some object in the group"},
|
2012-12-11 22:00:22 +00:00
|
|
|
{FREESTYLE_LINESET_GR_NOT, "EXCLUSIVE", 0, "Exclusive",
|
|
|
|
|
"Select feature edges not belonging to any object in the group"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2010-12-02 23:50:10 +00:00
|
|
|
|
2011-10-06 02:04:43 +00:00
|
|
|
static EnumPropertyItem face_mark_negation_items[] = {
|
2011-10-30 09:05:47 +00:00
|
|
|
{0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfying the given face mark conditions"},
|
2012-12-11 22:00:22 +00:00
|
|
|
{FREESTYLE_LINESET_FM_NOT, "EXCLUSIVE", 0, "Exclusive",
|
|
|
|
|
"Select feature edges not satisfying the given face mark conditions"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2011-10-06 02:04:43 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem face_mark_condition_items[] = {
|
2014-04-24 23:42:05 +09:00
|
|
|
{0, "ONE", 0, "One Face", "Select a feature edge if either of its adjacent faces is marked"},
|
2012-12-11 22:00:22 +00:00
|
|
|
{FREESTYLE_LINESET_FM_BOTH, "BOTH", 0, "Both Faces",
|
2014-04-24 23:42:05 +09:00
|
|
|
"Select a feature edge if both of its adjacent faces are marked"},
|
2012-12-11 22:00:22 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2011-10-06 02:04:43 +00:00
|
|
|
|
2010-06-25 22:45:42 +00:00
|
|
|
static EnumPropertyItem freestyle_ui_mode_items[] = {
|
2012-12-11 22:00:22 +00:00
|
|
|
{FREESTYLE_CONTROL_SCRIPT_MODE, "SCRIPT", 0, "Python Scripting Mode",
|
2014-04-24 23:22:21 +09:00
|
|
|
"Advanced mode for using style modules written in Python"},
|
2012-12-11 22:00:22 +00:00
|
|
|
{FREESTYLE_CONTROL_EDITOR_MODE, "EDITOR", 0, "Parameter Editor Mode",
|
|
|
|
|
"Basic mode for interactive style parameter editing"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2010-06-25 22:45:42 +00:00
|
|
|
|
2013-04-05 16:55:12 +00:00
|
|
|
static EnumPropertyItem visibility_items[] = {
|
2011-10-30 09:05:47 +00:00
|
|
|
{FREESTYLE_QI_VISIBLE, "VISIBLE", 0, "Visible", "Select visible feature edges"},
|
|
|
|
|
{FREESTYLE_QI_HIDDEN, "HIDDEN", 0, "Hidden", "Select hidden feature edges"},
|
2012-12-11 22:00:22 +00:00
|
|
|
{FREESTYLE_QI_RANGE, "RANGE", 0, "QI Range",
|
|
|
|
|
"Select feature edges within a range of quantitative invisibility (QI) values"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2010-06-25 22:45:42 +00:00
|
|
|
/* FreestyleLineSet */
|
|
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
srna = RNA_def_struct(brna, "FreestyleLineSet", NULL);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Freestyle Line Set", "Line set for associating lines and style parameters");
|
2010-06-25 22:45:42 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
/* access to line style settings is redirected through functions
|
|
|
|
|
* to allow proper id-buttons functionality
|
|
|
|
|
*/
|
|
|
|
|
prop = RNA_def_property(srna, "linestyle", PROP_POINTER, PROP_NONE);
|
2010-06-25 22:45:42 +00:00
|
|
|
RNA_def_property_struct_type(prop, "FreestyleLineStyle");
|
2013-04-05 16:55:12 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
|
2012-12-11 22:00:22 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_FreestyleLineSet_linestyle_get",
|
|
|
|
|
"rna_FreestyleLineSet_linestyle_set", NULL, NULL);
|
2010-06-25 22:45:42 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Line Style", "Line style settings");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-25 22:45:42 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
2010-06-25 22:45:42 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "name");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Line Set Name", "Line set name");
|
2013-09-04 01:15:23 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2010-06-25 22:45:42 +00:00
|
|
|
RNA_def_struct_name_property(srna, prop);
|
|
|
|
|
|
2013-03-02 23:30:23 +00:00
|
|
|
prop = RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
|
2010-06-25 22:45:42 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_LINESET_ENABLED);
|
2013-03-02 23:30:23 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Render", "Enable or disable this line set during stroke rendering");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-25 22:45:42 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_by_visibility", PROP_BOOLEAN, PROP_NONE);
|
2010-07-12 23:31:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_VISIBILITY);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Selection by Visibility", "Select feature edges based on visibility");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-07-12 23:31:15 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_by_edge_types", PROP_BOOLEAN, PROP_NONE);
|
2010-07-12 23:31:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_EDGE_TYPES);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Selection by Edge Types", "Select feature edges based on edge types");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-07-12 23:31:15 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_by_group", PROP_BOOLEAN, PROP_NONE);
|
2010-12-02 23:50:10 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_GROUP);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Selection by Group", "Select feature edges based on a group of objects");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-12-02 23:50:10 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_by_image_border", PROP_BOOLEAN, PROP_NONE);
|
2010-12-03 23:17:49 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_IMAGE_BORDER);
|
2012-12-11 22:00:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Selection by Image Border",
|
|
|
|
|
"Select feature edges by image border (less memory consumption)");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-12-03 23:17:49 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_by_face_marks", PROP_BOOLEAN, PROP_NONE);
|
2011-10-06 02:04:43 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_FACE_MARK);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Selection by Face Marks", "Select feature edges by face marks");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-06 02:04:43 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "edge_type_negation", PROP_ENUM, PROP_NONE);
|
2010-07-05 22:32:51 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
|
2010-12-02 23:50:10 +00:00
|
|
|
RNA_def_property_enum_items(prop, edge_type_negation_items);
|
2012-12-11 22:00:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Edge Type Negation",
|
2014-04-24 23:22:21 +09:00
|
|
|
"Specify either inclusion or exclusion of feature edges selected by edge types");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-07-05 22:32:51 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "edge_type_combination", PROP_ENUM, PROP_NONE);
|
2010-07-05 22:32:51 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
|
2010-12-02 23:50:10 +00:00
|
|
|
RNA_def_property_enum_items(prop, edge_type_combination_items);
|
2012-12-11 22:00:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Edge Type Combination",
|
2014-04-24 23:22:21 +09:00
|
|
|
"Specify a logical combination of selection conditions on feature edge types");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-07-05 22:32:51 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
|
2010-12-02 23:50:10 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "group");
|
|
|
|
|
RNA_def_property_struct_type(prop, "Group");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Group", "A group of objects based on which feature edges are selected");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-12-02 23:50:10 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "group_negation", PROP_ENUM, PROP_NONE);
|
2010-12-02 23:50:10 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
|
|
|
|
|
RNA_def_property_enum_items(prop, group_negation_items);
|
2012-12-11 22:00:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Group Negation",
|
2014-04-24 23:22:21 +09:00
|
|
|
"Specify either inclusion or exclusion of feature edges belonging to a group of objects");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-06 02:04:43 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "face_mark_negation", PROP_ENUM, PROP_NONE);
|
2011-10-06 02:04:43 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
|
|
|
|
|
RNA_def_property_enum_items(prop, face_mark_negation_items);
|
2012-12-11 22:00:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Face Mark Negation",
|
2014-04-24 23:22:21 +09:00
|
|
|
"Specify either inclusion or exclusion of feature edges selected by face marks");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-06 02:04:43 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "face_mark_condition", PROP_ENUM, PROP_NONE);
|
2011-10-06 02:04:43 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
|
|
|
|
|
RNA_def_property_enum_items(prop, face_mark_condition_items);
|
2015-04-06 20:43:34 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Face Mark Condition",
|
|
|
|
|
"Specify a feature edge selection condition based on face marks");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_silhouette", PROP_BOOLEAN, PROP_NONE);
|
2010-07-12 23:31:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SILHOUETTE);
|
2015-04-06 20:43:34 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Silhouette",
|
|
|
|
|
"Select silhouettes (edges at the boundary of visible and hidden faces)");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_border", PROP_BOOLEAN, PROP_NONE);
|
2010-07-12 23:31:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_BORDER);
|
2014-04-24 23:22:21 +09:00
|
|
|
RNA_def_property_ui_text(prop, "Border", "Select border edges (open mesh edges)");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_crease", PROP_BOOLEAN, PROP_NONE);
|
2010-07-12 23:31:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CREASE);
|
2015-04-06 20:43:34 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Crease",
|
|
|
|
|
"Select crease edges (those between two faces making an angle smaller than the Crease Angle)");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_ridge_valley", PROP_BOOLEAN, PROP_NONE);
|
2012-02-05 12:50:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_RIDGE_VALLEY);
|
2015-04-06 20:43:34 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Ridge & Valley",
|
|
|
|
|
"Select ridges and valleys (boundary lines between convex and concave areas of surface)");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
|
2010-07-12 23:31:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR);
|
2014-04-24 23:22:21 +09:00
|
|
|
RNA_def_property_ui_text(prop, "Suggestive Contour", "Select suggestive contours (almost silhouette/contour edges)");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_material_boundary", PROP_BOOLEAN, PROP_NONE);
|
2010-07-12 23:31:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_MATERIAL_BOUNDARY);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Material Boundary", "Select edges at material boundaries");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_contour", PROP_BOOLEAN, PROP_NONE);
|
2010-07-12 23:31:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CONTOUR);
|
2014-04-24 23:22:21 +09:00
|
|
|
RNA_def_property_ui_text(prop, "Contour", "Select contours (outer silhouettes of each object)");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_external_contour", PROP_BOOLEAN, PROP_NONE);
|
2010-07-12 23:31:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EXTERNAL_CONTOUR);
|
2015-04-06 20:43:34 +02:00
|
|
|
RNA_def_property_ui_text(prop, "External Contour",
|
|
|
|
|
"Select external contours (outer silhouettes of occluding and occluded objects)");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "select_edge_mark", PROP_BOOLEAN, PROP_NONE);
|
2011-10-06 02:04:43 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EDGE_MARK);
|
2014-04-24 23:22:21 +09:00
|
|
|
RNA_def_property_ui_text(prop, "Edge Mark", "Select edge marks (edges annotated by Freestyle edge marks)");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-06 02:04:43 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_silhouette", PROP_BOOLEAN, PROP_NONE);
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_SILHOUETTE);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Silhouette", "Exclude silhouette edges");
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-27 20:57:14 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_border", PROP_BOOLEAN, PROP_NONE);
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_BORDER);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Border", "Exclude border edges");
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-27 20:57:14 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_crease", PROP_BOOLEAN, PROP_NONE);
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_CREASE);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Crease", "Exclude crease edges");
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-27 20:57:14 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_ridge_valley", PROP_BOOLEAN, PROP_NONE);
|
2012-02-05 12:50:01 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_RIDGE_VALLEY);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Ridge & Valley", "Exclude ridges and valleys");
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-27 20:57:14 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_SUGGESTIVE_CONTOUR);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Suggestive Contour", "Exclude suggestive contours");
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-27 20:57:14 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_material_boundary", PROP_BOOLEAN, PROP_NONE);
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_MATERIAL_BOUNDARY);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Material Boundary", "Exclude edges at material boundaries");
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-27 20:57:14 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_contour", PROP_BOOLEAN, PROP_NONE);
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_CONTOUR);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Contour", "Exclude contours");
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-27 20:57:14 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_external_contour", PROP_BOOLEAN, PROP_NONE);
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_EXTERNAL_CONTOUR);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "External Contour", "Exclude external contours");
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-27 20:57:14 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "exclude_edge_mark", PROP_BOOLEAN, PROP_NONE);
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_EDGE_MARK);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Edge Mark", "Exclude edge marks");
|
2011-10-27 20:57:14 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_X, 0);
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2011-10-27 20:57:14 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "visibility", PROP_ENUM, PROP_NONE);
|
2010-06-27 00:03:34 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "qi");
|
|
|
|
|
RNA_def_property_enum_items(prop, visibility_items);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Visibility", "Determine how to use visibility for feature edge selection");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "qi_start", PROP_INT, PROP_UNSIGNED);
|
2010-06-27 00:03:34 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "qi_start");
|
|
|
|
|
RNA_def_property_range(prop, 0, INT_MAX);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Start", "First QI value of the QI range");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-27 00:03:34 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "qi_end", PROP_INT, PROP_UNSIGNED);
|
2010-06-27 00:03:34 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "qi_end");
|
|
|
|
|
RNA_def_property_range(prop, 0, INT_MAX);
|
|
|
|
|
RNA_def_property_ui_text(prop, "End", "Last QI value of the QI range");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-25 22:45:42 +00:00
|
|
|
|
2009-10-07 05:16:23 +00:00
|
|
|
/* FreestyleModuleSettings */
|
|
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
srna = RNA_def_struct(brna, "FreestyleModuleSettings", NULL);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_struct_sdna(srna, "FreestyleModuleConfig");
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Freestyle Module", "Style module configuration for specifying a style module");
|
2009-10-07 05:16:23 +00:00
|
|
|
|
2013-04-03 00:00:29 +00:00
|
|
|
prop = RNA_def_property(srna, "script", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "Text");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Style Module", "Python script to define a style module");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2013-04-03 00:00:29 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "is_displayed", 1);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use", "Enable or disable this style module during stroke rendering");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2009-10-07 05:16:23 +00:00
|
|
|
|
|
|
|
|
/* FreestyleSettings */
|
|
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
srna = RNA_def_struct(brna, "FreestyleSettings", NULL);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_struct_sdna(srna, "FreestyleConfig");
|
|
|
|
|
RNA_def_struct_nested(brna, srna, "SceneRenderLayer");
|
2015-10-24 02:44:43 +11:00
|
|
|
RNA_def_struct_ui_text(srna, "Freestyle Settings", "Freestyle settings for a SceneRenderLayer data-block");
|
2009-10-07 05:16:23 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "modules", PROP_COLLECTION, PROP_NONE);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "modules", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "FreestyleModuleSettings");
|
2014-05-13 10:29:28 +09:00
|
|
|
RNA_def_property_ui_text(prop, "Style Modules", "A list of style modules (to be applied from top to bottom)");
|
2014-05-13 11:50:54 +09:00
|
|
|
rna_def_freestyle_modules(brna, prop);
|
2009-10-07 05:16:23 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
|
2010-06-25 22:45:42 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "mode");
|
|
|
|
|
RNA_def_property_enum_items(prop, freestyle_ui_mode_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Control Mode", "Select the Freestyle control mode");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-25 22:45:42 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "use_culling", PROP_BOOLEAN, PROP_NONE);
|
2012-10-28 16:09:51 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_CULLING);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Culling", "If enabled, out-of-view edges are ignored");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2012-10-28 16:09:51 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "use_suggestive_contours", PROP_BOOLEAN, PROP_NONE);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_SUGGESTIVE_CONTOURS_FLAG);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Suggestive Contours", "Enable suggestive contours");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2009-10-07 05:16:23 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "use_ridges_and_valleys", PROP_BOOLEAN, PROP_NONE);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_RIDGES_AND_VALLEYS_FLAG);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Ridges and Valleys", "Enable ridges and valleys");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2009-10-07 05:16:23 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "use_material_boundaries", PROP_BOOLEAN, PROP_NONE);
|
2010-05-22 22:21:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_MATERIAL_BOUNDARIES_FLAG);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Material Boundaries", "Enable material boundaries");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-05-22 22:21:15 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "use_smoothness", PROP_BOOLEAN, PROP_NONE);
|
2010-11-27 11:23:11 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_FACE_SMOOTHNESS_FLAG);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Face Smoothness", "Take face smoothness into account in view map calculation");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-11-27 11:23:11 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "use_advanced_options", PROP_BOOLEAN, PROP_NONE);
|
2012-02-05 11:37:39 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_ADVANCED_OPTIONS_FLAG);
|
2013-04-07 10:23:48 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Advanced Options",
|
2012-12-11 22:00:22 +00:00
|
|
|
"Enable advanced edge detection options (sphere radius and Kr derivative epsilon)");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2012-02-05 11:37:39 +00:00
|
|
|
|
2014-01-28 23:24:59 +09:00
|
|
|
prop = RNA_def_property(srna, "use_view_map_cache", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_VIEW_MAP_CACHE);
|
2015-04-06 20:43:34 +02:00
|
|
|
RNA_def_property_ui_text(prop, "View Map Cache",
|
|
|
|
|
"Keep the computed view map and avoid re-calculating it if mesh geometry is unchanged");
|
2014-01-28 23:24:59 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_use_view_map_cache_update");
|
|
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "sphere_radius", PROP_FLOAT, PROP_NONE);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "sphere_radius");
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 1000.0);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Sphere Radius", "Sphere radius for computing curvatures");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2009-10-07 05:16:23 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "kr_derivative_epsilon", PROP_FLOAT, PROP_NONE);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "dkr_epsilon");
|
2012-07-15 22:30:02 +00:00
|
|
|
RNA_def_property_range(prop, -1000.0, 1000.0);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Kr Derivative Epsilon", "Kr derivative epsilon for computing suggestive contours");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-05-22 23:56:42 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "crease_angle", PROP_FLOAT, PROP_ANGLE);
|
2010-05-22 23:56:42 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "crease_angle");
|
2012-12-09 23:19:46 +00:00
|
|
|
RNA_def_property_range(prop, 0.0, DEG2RAD(180.0));
|
|
|
|
|
RNA_def_property_ui_text(prop, "Crease Angle", "Angular threshold for detecting crease edges");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2010-06-25 22:45:42 +00:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "linesets", PROP_COLLECTION, PROP_NONE);
|
2010-06-25 22:45:42 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "linesets", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "FreestyleLineSet");
|
2010-08-28 15:10:37 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Line Sets", "");
|
|
|
|
|
rna_def_freestyle_linesets(brna, prop);
|
2009-10-07 05:16:23 +00:00
|
|
|
}
|
|
|
|
|
|
2010-07-09 22:16:52 +00:00
|
|
|
static void rna_def_scene_game_recast_data(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "SceneGameRecastData", NULL);
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_struct_sdna(srna, "RecastData");
|
|
|
|
|
RNA_def_struct_nested(brna, srna, "Scene");
|
2015-10-24 02:44:43 +11:00
|
|
|
RNA_def_struct_ui_text(srna, "Recast Data", "Recast data for a Game data-block");
|
2010-07-09 22:16:52 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "cell_size", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "cellsize");
|
2011-02-16 17:07:18 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.1, 1, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 0.3f);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Cell Size", "Rasterized cell size");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "cell_height", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "cellheight");
|
2011-02-16 17:07:18 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.1, 1, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 0.2f);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Cell Height", "Rasterized cell height");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "agent_height", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "agentheight");
|
2011-02-16 17:07:18 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.1, 5, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 2.0f);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Agent Height", "Minimum height where the agent can still walk");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "agent_radius", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "agentradius");
|
2011-02-16 17:07:18 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.1, 5, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 0.6f);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Agent Radius", "Radius of the agent");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "climb_max", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "agentmaxclimb");
|
2011-02-16 17:07:18 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.1, 5, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 0.9f);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Max Climb", "Maximum height between grid cells the agent can climb");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "slope_max", PROP_FLOAT, PROP_ANGLE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "agentmaxslope");
|
2015-01-31 17:23:30 +11:00
|
|
|
RNA_def_property_range(prop, 0, M_PI_2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, M_PI_4);
|
2012-12-31 15:54:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Max Slope", "Maximum walkable slope angle");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "region_min_size", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "regionminsize");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 150, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 8.0f);
|
2011-10-20 07:56:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Min Region Size", "Minimum regions size (smaller regions will be deleted)");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "region_merge_size", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "regionmergesize");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 150, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 20.0f);
|
2011-10-20 07:56:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Merged Region Size", "Minimum regions size (smaller regions will be merged)");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "edge_max_len", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "edgemaxlen");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 50, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 12.0f);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Max Edge Length", "Maximum contour edge length");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "edge_max_error", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "edgemaxerror");
|
2011-02-16 17:07:18 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.1, 3.0, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 1.3f);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Max Edge Error", "Maximum distance error from contour to cells");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "verts_per_poly", PROP_INT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "vertsperpoly");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 3, 12, 1, -1);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 6);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Verts Per Poly", "Max number of vertices per polygon");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "sample_dist", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "detailsampledist");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 6.0f);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Sample Distance", "Detail mesh sample spacing");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "sample_max_error", PROP_FLOAT, PROP_NONE);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "detailsamplemaxerror");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 1.0f);
|
2010-09-03 19:56:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Max Sample Error", "Detail mesh simplification max sample error");
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
|
|
|
|
|
static void rna_def_bake_data(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "BakeSettings", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "BakeData");
|
|
|
|
|
RNA_def_struct_nested(brna, srna, "RenderSettings");
|
2015-10-24 02:44:43 +11:00
|
|
|
RNA_def_struct_ui_text(srna, "Bake Data", "Bake data for a Scene data-block");
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
|
2014-06-11 22:46:35 -03:00
|
|
|
prop = RNA_def_property(srna, "cage_object", PROP_STRING, PROP_NONE);
|
2014-06-11 02:39:35 -03:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "cage");
|
2014-06-11 22:46:35 -03:00
|
|
|
RNA_def_property_ui_text(prop, "Cage Object", "Object to use as cage "
|
2014-06-11 02:39:35 -03:00
|
|
|
"instead of calculating the cage from the active object with cage extrusion");
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
|
|
|
|
|
RNA_def_property_ui_text(prop, "File Path", "Image filepath to use when saving externally");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "width", PROP_INT, PROP_PIXEL);
|
|
|
|
|
RNA_def_property_range(prop, 4, 10000);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Width", "Horizontal dimension of the baking map");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "height", PROP_INT, PROP_PIXEL);
|
|
|
|
|
RNA_def_property_range(prop, 4, 10000);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Height", "Vertical dimension of the baking map");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "margin", PROP_INT, PROP_PIXEL);
|
|
|
|
|
RNA_def_property_range(prop, 0, SHRT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0, 64, 1, 1);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Margin", "Extends the baked result as a post process filter");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "cage_extrusion", PROP_FLOAT, PROP_NONE);
|
2014-08-14 10:36:07 +10:00
|
|
|
RNA_def_property_range(prop, 0.0, FLT_MAX);
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 3);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Cage Extrusion",
|
|
|
|
|
"Distance to use for the inward ray cast when using selected to active");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "normal_space", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_space");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_normal_space_items);
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "normal_r", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_swizzle[0]");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_normal_swizzle_items);
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
RNA_def_property_ui_text(prop, "Normal Space", "Axis to bake in red channel");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "normal_g", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_swizzle[1]");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_normal_swizzle_items);
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
RNA_def_property_ui_text(prop, "Normal Space", "Axis to bake in green channel");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "normal_b", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_swizzle[2]");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_normal_swizzle_items);
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
RNA_def_property_ui_text(prop, "Normal Space", "Axis to bake in blue channel");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "im_format");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ImageFormatSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Image Format", "");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "save_mode", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "save_mode");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_bake_save_mode_items);
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
RNA_def_property_ui_text(prop, "Save Mode", "Choose how to save the baking map");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
/* flags */
|
|
|
|
|
prop = RNA_def_property(srna, "use_selected_to_active", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_BAKE_TO_ACTIVE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Selected to Active",
|
|
|
|
|
"Bake shading on the surface of selected objects to the active object");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_clear", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_BAKE_CLEAR);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Clear",
|
|
|
|
|
"Clear Images before baking (internal only)");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_split_materials", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_BAKE_SPLIT_MAT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Split Materials",
|
|
|
|
|
"Split external images per material (external only)");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_automatic_name", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_BAKE_AUTO_NAME);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Automatic Name",
|
|
|
|
|
"Automatically name the output file with the pass type (external only)");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2014-06-11 02:39:35 -03:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_cage", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_BAKE_CAGE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Cage",
|
|
|
|
|
"Cast rays to active object from a cage");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
}
|
|
|
|
|
|
2009-09-14 16:52:06 +00:00
|
|
|
static void rna_def_scene_game_data(BlenderRNA *brna)
|
2009-07-20 20:28:29 +00:00
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
2009-07-02 11:28:42 +00:00
|
|
|
|
2012-05-20 19:49:27 +00:00
|
|
|
static EnumPropertyItem aasamples_items[] = {
|
2012-01-11 20:53:22 +00:00
|
|
|
{0, "SAMPLES_0", 0, "Off", ""},
|
|
|
|
|
{2, "SAMPLES_2", 0, "2x", ""},
|
|
|
|
|
{4, "SAMPLES_4", 0, "4x", ""},
|
|
|
|
|
{8, "SAMPLES_8", 0, "8x", ""},
|
|
|
|
|
{16, "SAMPLES_16", 0, "16x", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-11 20:53:22 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static EnumPropertyItem framing_types_items[] = {
|
2011-09-26 12:08:04 +00:00
|
|
|
{SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox",
|
|
|
|
|
"Show the entire viewport in the display window, using bar horizontally or vertically"},
|
|
|
|
|
{SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend",
|
2012-03-18 09:27:36 +00:00
|
|
|
"Show the entire viewport in the display window, viewing more horizontally "
|
|
|
|
|
"or vertically"},
|
2009-08-18 15:27:48 +00:00
|
|
|
{SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", "Stretch or squeeze the viewport to fill the display window"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static EnumPropertyItem dome_modes_items[] = {
|
2009-07-20 20:28:29 +00:00
|
|
|
{DOME_FISHEYE, "FISHEYE", 0, "Fisheye", ""},
|
|
|
|
|
{DOME_TRUNCATED_FRONT, "TRUNCATED_FRONT", 0, "Front-Truncated", ""},
|
|
|
|
|
{DOME_TRUNCATED_REAR, "TRUNCATED_REAR", 0, "Rear-Truncated", ""},
|
|
|
|
|
{DOME_ENVMAP, "ENVMAP", 0, "Cube Map", ""},
|
|
|
|
|
{DOME_PANORAM_SPH, "PANORAM_SPH", 0, "Spherical Panoramic", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
static EnumPropertyItem stereo_modes_items[] = {
|
2009-07-20 20:28:29 +00:00
|
|
|
{STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""},
|
|
|
|
|
{STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""},
|
|
|
|
|
{STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""},
|
|
|
|
|
{STEREO_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", ""},
|
|
|
|
|
{STEREO_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-side", ""},
|
|
|
|
|
{STEREO_VINTERLACE, "VINTERLACE", 0, "Vinterlace", ""},
|
2014-01-02 00:26:15 +01:00
|
|
|
{STEREO_3DTVTOPBOTTOM, "3DTVTOPBOTTOM", 0, "3DTV Top-Bottom", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
static EnumPropertyItem stereo_items[] = {
|
2009-11-15 23:48:21 +00:00
|
|
|
{STEREO_NOSTEREO, "NONE", 0, "None", "Disable Stereo and Dome environments"},
|
|
|
|
|
{STEREO_ENABLED, "STEREO", 0, "Stereo", "Enable Stereo environment"},
|
|
|
|
|
{STEREO_DOME, "DOME", 0, "Dome", "Enable Dome environment"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-07-20 20:28:29 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem physics_engine_items[] = {
|
2011-05-15 17:59:48 +00:00
|
|
|
{WOPHY_NONE, "NONE", 0, "None", "Don't use a physics engine"},
|
|
|
|
|
{WOPHY_BULLET, "BULLET", 0, "Bullet", "Use the Bullet physics engine"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static EnumPropertyItem material_items[] = {
|
2010-02-11 01:11:52 +00:00
|
|
|
{GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials"},
|
|
|
|
|
{GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2010-06-10 00:19:06 +00:00
|
|
|
static EnumPropertyItem obstacle_simulation_items[] = {
|
|
|
|
|
{OBSTSIMULATION_NONE, "NONE", 0, "None", ""},
|
2011-09-17 13:33:03 +00:00
|
|
|
{OBSTSIMULATION_TOI_rays, "RVO_RAYS", 0, "RVO (rays)", ""},
|
|
|
|
|
{OBSTSIMULATION_TOI_cells, "RVO_CELLS", 0, "RVO (cells)", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2010-06-10 00:19:06 +00:00
|
|
|
|
2013-07-29 22:36:51 +00:00
|
|
|
static EnumPropertyItem vsync_items[] = {
|
2013-08-06 14:55:00 +00:00
|
|
|
{VSYNC_OFF, "OFF", 0, "Off", "Disable vsync"},
|
|
|
|
|
{VSYNC_ON, "ON", 0, "On", "Enable vsync"},
|
|
|
|
|
{VSYNC_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", "Enable adaptive vsync (if supported)"},
|
2013-07-29 22:36:51 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2012-12-20 00:29:31 +00:00
|
|
|
static EnumPropertyItem storage_items[] = {
|
2013-08-06 14:55:00 +00:00
|
|
|
{RAS_STORE_AUTO, "AUTO", 0, "Auto Select", "Choose the best supported mode"},
|
2015-12-06 15:24:55 -08:00
|
|
|
{RAS_STORE_VA, "VERTEX_ARRAY", 0, "Vertex Arrays", "Usually the best choice (good performance with display lists)"},
|
2012-12-24 17:40:47 +00:00
|
|
|
{RAS_STORE_VBO, "VERTEX_BUFFER_OBJECT", 0, "Vertex Buffer Objects",
|
2015-12-06 15:24:55 -08:00
|
|
|
"Typically slower than vertex arrays with display lists, requires at least OpenGL 1.4"},
|
2012-12-18 20:56:25 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "SceneGameData", NULL);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_struct_sdna(srna, "GameData");
|
|
|
|
|
RNA_def_struct_nested(brna, srna, "Scene");
|
2015-10-24 02:44:43 +11:00
|
|
|
RNA_def_struct_ui_text(srna, "Game Data", "Game data for a Scene data-block");
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2013-12-13 04:39:15 +11:00
|
|
|
prop = RNA_def_property(srna, "resolution_x", PROP_INT, PROP_PIXEL);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "xplay");
|
|
|
|
|
RNA_def_property_range(prop, 4, 10000);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 640);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the screen");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2013-12-13 04:39:15 +11:00
|
|
|
prop = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_PIXEL);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "yplay");
|
|
|
|
|
RNA_def_property_range(prop, 4, 10000);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 480);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the screen");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
2013-07-29 22:36:51 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "vsync", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "vsync");
|
|
|
|
|
RNA_def_property_enum_items(prop, vsync_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Vsync", "Change vsync settings");
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "samples", PROP_ENUM, PROP_NONE);
|
2012-01-11 20:53:22 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "aasamples");
|
|
|
|
|
RNA_def_property_enum_items(prop, aasamples_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "AA Samples", "The number of AA Samples to use for MSAA");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "depth");
|
|
|
|
|
RNA_def_property_range(prop, 8, 32);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 32);
|
2011-09-29 14:41:11 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Bits", "Display bit depth of full screen display");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "exit_key", PROP_ENUM, PROP_NONE);
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "exitkey");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_event_type_items);
|
2015-09-27 09:49:41 +02:00
|
|
|
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_UI_EVENTS);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_enum_default(prop, ESCKEY);
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, "rna_GameSettings_exit_key_set", NULL);
|
2012-12-24 17:40:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Exit Key", "The key that exits the Game Engine");
|
Cucumber, first batch of merge - UI changes and custom exit key
---------------------------------------------------------------
This was a test drive to see how painful the merge will be.
Next batches are:
- use desktop option for fullscreen
- multisampling option
- bullet collision mask
- python
- storage (vbo, dl, ...)
- lighting
[lighting still needs review]
[python could use review, although it should be straightforward]
[storage should be tested more I think]
Merged /branches/soc-2011-cucumber:r
36991,37059,37157,37416,37497-37499,37501,37522,39036,40593
36991:
==UI==
* Made some options available in Blender Game that were only available in Blender Render (camera resolution, animation fps)
* Created a panel for the embedded player
* Renamed the FPS option for the standalone player to Refresh Rate
* Moved framing options to display
* Made a button to launch the blender player from within blender (only tested on windows for now)
37059:
==UI==
* Added the option to change the exit key for the BGE. The UI currently just sets a number, and this feature most likely does not work for blenderplayer yet. More work on this to come.
* Removed the physics settings from the scene panel for the BGE.
* Added an Add menu in the logic brick header.
37157:
Making the bake options available in Blender Game
37416:
Making the exit key UI element accept key presses instead of numbers. It still does not work for the Blenderplayer, and it does not limit the input to key presses (other events don't work for exiting)
37497:
Some more work on getting the exit key to work in the Blenderplayer.
Input is now restricted to keyboard events only for the exit key UI.
37498:
Some clean up from the last commit.
The exit key setting affects the Blenderplayer now.
37499:
Cleaning up some duplicate code. Now the reverseTranslateTable for converting blender key codes to ketsji key codes is only defined in BL_BlenderDataConverter.
37501:
Centralizing the exit key methods to the keyboard devices. This should make it easier to get exit key control to the python API.
[37517: committed previously]
37522:
Moved control of the exit key away from the keyboard devices, and moved it to ketsjiengine.
Added setExitKey and getExitKey to the python API
39036:
A couple of the doversions were in the wrong spot. This should fix some issues with the exit key not being set.
[not committed entirely, see below]]
40552: space_logic.py (* fixed an error in space_logic.py *)
40593:
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
########################################################
code left behind (to be included in next commit):
########################################################
{
/* Initialize default values for collision masks */
Object *ob;
for(ob=main->object.first; ob; ob=ob->id.next)
ob->col_group = ob->col_mask = 1;
}
2011-12-20 03:11:56 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2012-12-20 00:29:31 +00:00
|
|
|
prop = RNA_def_property(srna, "raster_storage", PROP_ENUM, PROP_NONE);
|
2012-12-18 20:56:25 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "raster_storage");
|
|
|
|
|
RNA_def_property_enum_items(prop, storage_items);
|
2012-12-24 17:40:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Storage", "Set the storage mode used by the rasterizer");
|
2012-12-18 20:56:25 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/* Do we need it here ? (since we already have it in World */
|
|
|
|
|
prop = RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "freqplay");
|
|
|
|
|
RNA_def_property_range(prop, 4, 2000);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 60);
|
2011-09-29 14:41:11 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Freq", "Display clock frequency of fullscreen display");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_fullscreen", PROP_BOOLEAN, PROP_NONE);
|
2012-01-11 20:53:22 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "playerflag", GAME_PLAYER_FULLSCREEN);
|
2011-09-29 14:41:11 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Fullscreen", "Start player in a new fullscreen display");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_desktop", PROP_BOOLEAN, PROP_NONE);
|
2012-01-11 20:53:22 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "playerflag", GAME_PLAYER_DESKTOP_RESOLUTION);
|
2012-07-04 15:52:07 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Desktop", "Use the current desktop resolution in fullscreen mode");
|
2012-01-11 20:53:22 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2009-07-20 20:28:29 +00:00
|
|
|
/* Framing */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_type", PROP_ENUM, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "framing.type");
|
|
|
|
|
RNA_def_property_enum_items(prop, framing_types_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Framing Types", "Select the type of Framing you want");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_color", PROP_FLOAT, PROP_COLOR);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "framing.col");
|
2010-12-14 16:33:04 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_array(prop, 3);
|
2010-12-03 12:30:59 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Framing Color", "Set color of the bars");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
|
|
|
|
/* Stereo */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "stereo", PROP_ENUM, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "stereoflag");
|
|
|
|
|
RNA_def_property_enum_items(prop, stereo_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stereo Options", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "stereo_mode", PROP_ENUM, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "stereomode");
|
|
|
|
|
RNA_def_property_enum_items(prop, stereo_modes_items);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_enum_default(prop, STEREO_ANAGLYPH);
|
2009-11-15 17:10:52 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stereo Mode", "Stereographic techniques");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "stereo_eye_separation", PROP_FLOAT, PROP_NONE);
|
2009-12-29 15:47:20 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "eyeseparation");
|
|
|
|
|
RNA_def_property_range(prop, 0.01, 5.0);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 0.1f);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Eye Separation",
|
2013-01-27 07:23:58 +00:00
|
|
|
"Set the distance between the eyes - the camera focal distance/30 should be fine");
|
2009-12-29 15:47:20 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2009-07-20 20:28:29 +00:00
|
|
|
/* Dome */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dome_mode", PROP_ENUM, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "dome.mode");
|
|
|
|
|
RNA_def_property_enum_items(prop, dome_modes_items);
|
2009-11-15 17:10:52 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Dome Mode", "Dome physical configurations");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dome_tessellation", PROP_INT, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "dome.res");
|
|
|
|
|
RNA_def_property_ui_range(prop, 1, 8, 1, 1);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 4);
|
2010-05-04 05:15:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tessellation", "Tessellation level - check the generated mesh in wireframe mode");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dome_buffer_resolution", PROP_FLOAT, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "dome.resbuf");
|
2012-04-07 15:46:26 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.1, 1.0, 0.1, 2);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 1.0f);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Buffer Resolution", "Buffer Resolution - decrease it to increase speed");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dome_angle", PROP_INT, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "dome.angle");
|
|
|
|
|
RNA_def_property_ui_range(prop, 90, 250, 1, 1);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 180);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Angle", "Field of View of the Dome - it only works in mode Fisheye and Truncated");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dome_tilt", PROP_INT, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "dome.tilt");
|
|
|
|
|
RNA_def_property_ui_range(prop, -180, 180, 1, 1);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Tilt", "Camera rotation in horizontal axis");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dome_text", PROP_POINTER, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "dome.warptext");
|
|
|
|
|
RNA_def_property_struct_type(prop, "Text");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Warp Data", "Custom Warp Mesh data file");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
|
|
|
|
/* physics */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "physicsEngine");
|
|
|
|
|
RNA_def_property_enum_items(prop, physics_engine_items);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_enum_default(prop, WOPHY_BULLET);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELERATION);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "gravity");
|
2011-05-10 15:13:03 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0, 25.0, 1, 2);
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 10000.0);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 9.8f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Physics Gravity",
|
|
|
|
|
"Gravitational constant used for physics simulation in the game engine");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2013-12-13 17:03:44 +01:00
|
|
|
prop = RNA_def_property(srna, "occlusion_culling_resolution", PROP_INT, PROP_PIXEL);
|
2010-12-31 04:12:20 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "occlusionRes");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_range(prop, 128.0, 1024.0);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 128);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Occlusion Resolution",
|
2013-12-13 17:03:44 +01:00
|
|
|
"Size of the occlusion buffer, use higher value for better precision (slower)");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "ticrate");
|
|
|
|
|
RNA_def_property_ui_range(prop, 1, 60, 1, 1);
|
2013-03-18 20:32:28 +00:00
|
|
|
RNA_def_property_range(prop, 1, 10000);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 60);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Frames Per Second",
|
2011-10-20 07:56:04 +00:00
|
|
|
"Nominal number of game frames per second "
|
2011-09-26 12:08:04 +00:00
|
|
|
"(physics fixed timestep = 1/fps, independently of actual frame rate)");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "logic_step_max", PROP_INT, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "maxlogicstep");
|
2015-02-04 14:15:40 +01:00
|
|
|
RNA_def_property_range(prop, 1, 10000);
|
|
|
|
|
RNA_def_property_ui_range(prop, 1, 50, 1, 1);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 5);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Max Logic Steps",
|
2011-10-20 07:56:04 +00:00
|
|
|
"Maximum number of logic frame per game frame if graphics slows down the game, "
|
2011-09-26 12:08:04 +00:00
|
|
|
"higher value allows better synchronization with physics");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "physics_step_max", PROP_INT, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "maxphystep");
|
2015-02-04 14:15:40 +01:00
|
|
|
RNA_def_property_range(prop, 1, 10000);
|
|
|
|
|
RNA_def_property_ui_range(prop, 1, 50, 1, 1);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 5);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Max Physics Steps",
|
2011-10-20 07:56:04 +00:00
|
|
|
"Maximum number of physics step per game frame if graphics slows down the game, "
|
2011-09-26 12:08:04 +00:00
|
|
|
"higher value allows physics to keep up with realtime");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "physics_step_sub", PROP_INT, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "physubstep");
|
2012-04-13 12:45:44 +00:00
|
|
|
RNA_def_property_range(prop, 1, 50);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_ui_range(prop, 1, 5, 1, 1);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 1);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Physics Sub Steps",
|
2011-10-20 07:56:04 +00:00
|
|
|
"Number of simulation substep per physic timestep, "
|
2011-09-26 12:08:04 +00:00
|
|
|
"higher value give better physics precision");
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-05-29 20:30:33 +00:00
|
|
|
prop = RNA_def_property(srna, "deactivation_linear_threshold", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "lineardeactthreshold");
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.001, 10000.0, 2, 3);
|
|
|
|
|
RNA_def_property_range(prop, 0.001, 10000.0);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 0.8f);
|
2012-05-29 20:30:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Deactivation Linear Threshold",
|
|
|
|
|
"Linear velocity that an object must be below before the deactivation timer can start");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "deactivation_angular_threshold", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "angulardeactthreshold");
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.001, 10000.0, 2, 3);
|
|
|
|
|
RNA_def_property_range(prop, 0.001, 10000.0);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 1.0f);
|
2012-05-29 20:30:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Deactivation Angular Threshold",
|
|
|
|
|
"Angular velocity that an object must be below before the deactivation timer can start");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "deactivation_time", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "deactivationtime");
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0, 60.0, 1, 1);
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 60.0);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Deactivation Time",
|
2012-06-03 13:38:27 +00:00
|
|
|
"Amount of time (in seconds) after which objects with a velocity less than the given "
|
|
|
|
|
"threshold will deactivate (0.0 means no deactivation)");
|
2012-05-29 20:30:33 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2009-07-20 20:28:29 +00:00
|
|
|
/* mode */
|
2013-01-27 19:57:47 +00:00
|
|
|
/* not used *//* deprecated !!!!!!!!!!!!! */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_occlusion_culling", PROP_BOOLEAN, PROP_NONE);
|
2012-08-01 17:19:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_DBVT_CULLING);
|
2013-01-27 19:57:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "DBVT Culling",
|
2013-01-29 08:01:50 +00:00
|
|
|
"Use optimized Bullet DBVT tree for view frustum and occlusion culling (more efficient, "
|
|
|
|
|
"but it can waste unnecessary CPU if the scene doesn't have occluder objects)");
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/* not used *//* deprecated !!!!!!!!!!!!! */
|
|
|
|
|
prop = RNA_def_property(srna, "use_activity_culling", PROP_BOOLEAN, PROP_NONE);
|
2012-08-01 17:19:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_ACTIVITY_CULLING);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Activity Culling", "Activity culling is enabled");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/* not used *//* deprecated !!!!!!!!!!!!! */
|
|
|
|
|
prop = RNA_def_property(srna, "activity_culling_box_radius", PROP_FLOAT, PROP_NONE);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "activityBoxRadius");
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 1000.0);
|
2012-02-27 18:14:56 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Box Radius",
|
2011-09-26 12:08:04 +00:00
|
|
|
"Radius of the activity bubble, in Manhattan length "
|
|
|
|
|
"(objects outside the box are activity-culled)");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
|
|
|
|
/* booleans */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_DEBUG_PROPS);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Debug Properties",
|
|
|
|
|
"Show properties marked for debugging while the game runs");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_FRAMERATE);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Framerate and Profile",
|
|
|
|
|
"Show framerate and profiling information while the game runs");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Show Physics Visualization",
|
|
|
|
|
"Show a visualization of physics bounds and interactions");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_mouse", PROP_BOOLEAN, PROP_NONE);
|
2011-01-23 17:25:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_MOUSE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Show Mouse", "Start player with a visible mouse cursor");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_frame_rate", PROP_BOOLEAN, PROP_NONE);
|
2010-02-22 12:25:58 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Frame Rate",
|
2013-11-18 14:18:46 -08:00
|
|
|
"Respect the frame rate from the Physics panel in the world properties "
|
|
|
|
|
"rather than rendering as many frames as possible");
|
2010-02-22 12:25:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_display_lists", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_DISPLAY_LISTS);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Display Lists",
|
|
|
|
|
"Use display lists to speed up rendering by keeping geometry on the GPU");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_deprecation_warnings", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_IGNORE_DEPRECATION_WARNINGS);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Deprecation Warnings",
|
|
|
|
|
"Print warnings when using deprecated features in the python API");
|
2010-02-22 12:25:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_animation_record", PROP_BOOLEAN, PROP_NONE);
|
2010-02-22 12:25:58 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_ENABLE_ANIMATION_RECORD);
|
2011-10-20 07:56:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Record Animation", "Record animation to F-Curves");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_auto_start", PROP_BOOLEAN, PROP_NONE);
|
2010-03-05 10:37:55 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_GameSettings_auto_start_get", "rna_GameSettings_auto_start_set");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Auto Start", "Automatically start game at load time");
|
2011-08-12 20:53:29 +00:00
|
|
|
|
2013-04-23 07:06:29 +00:00
|
|
|
prop = RNA_def_property(srna, "use_restrict_animation_updates", PROP_BOOLEAN, PROP_NONE);
|
2011-08-12 20:53:29 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_RESTRICT_ANIM_UPDATES);
|
2011-09-19 13:23:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Restrict Animation Updates",
|
2011-10-20 07:56:04 +00:00
|
|
|
"Restrict the number of animation updates to the animation FPS (this is "
|
|
|
|
|
"better for performance, but can cause issues with smooth playback)");
|
2010-03-05 10:37:55 +00:00
|
|
|
|
2009-08-18 15:27:48 +00:00
|
|
|
/* materials */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "matmode");
|
|
|
|
|
RNA_def_property_enum_items(prop, material_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, NULL);
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_glsl_lights", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_LIGHTS);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_glsl_shaders", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADERS);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_glsl_shadows", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADOWS);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_glsl_ramps", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_RAMPS);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_glsl_nodes", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_NODES);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
|
2009-08-18 15:27:48 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_glsl_color_management", PROP_BOOLEAN, PROP_NONE);
|
2011-05-02 09:08:43 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_COLOR_MANAGEMENT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "GLSL Color Management", "Use color management for GLSL rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
|
2011-05-02 09:08:43 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_glsl_extra_textures", PROP_BOOLEAN, PROP_NONE);
|
2009-08-18 15:27:48 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "GLSL Extra Textures",
|
|
|
|
|
"Use extra textures like normal or specular maps for GLSL rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
|
2010-06-10 00:19:06 +00:00
|
|
|
|
2012-12-24 03:13:53 +00:00
|
|
|
prop = RNA_def_property(srna, "use_material_caching", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_NO_MATERIAL_CACHING);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Material Caching",
|
2012-12-24 17:40:47 +00:00
|
|
|
"Cache materials in the converter (this is faster, but can cause problems with older "
|
2013-02-16 06:08:07 +00:00
|
|
|
"Singletexture and Multitexture games)");
|
2012-12-24 03:13:53 +00:00
|
|
|
|
2010-06-10 00:19:06 +00:00
|
|
|
/* obstacle simulation */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "obstacle_simulation", PROP_ENUM, PROP_NONE);
|
2010-06-10 00:19:06 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "obstacleSimulation");
|
|
|
|
|
RNA_def_property_enum_items(prop, obstacle_simulation_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Obstacle simulation", "Simulation used for obstacle avoidance in the game engine");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
2010-06-18 23:48:52 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "level_height", PROP_FLOAT, PROP_ACCELERATION);
|
2010-06-18 23:48:52 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "levelHeight");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 200.0f);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_float_default(prop, 2.0f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Level height",
|
|
|
|
|
"Max difference in heights of obstacles to enable their interaction");
|
2010-06-18 23:48:52 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
2010-07-09 22:16:52 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_obstacle_simulation", PROP_BOOLEAN, PROP_NONE);
|
2010-07-15 18:41:29 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_OBSTACLE_SIMULATION);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Visualization", "Enable debug visualization for obstacle simulation");
|
|
|
|
|
|
2010-07-09 22:16:52 +00:00
|
|
|
/* Recast Settings */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "recast_data", PROP_POINTER, PROP_NONE);
|
2010-07-09 22:16:52 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "recastData");
|
|
|
|
|
RNA_def_property_struct_type(prop, "SceneGameRecastData");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Recast Data", "");
|
|
|
|
|
|
|
|
|
|
/* Nestled Data */
|
|
|
|
|
rna_def_scene_game_recast_data(brna);
|
2015-03-22 18:13:53 +01:00
|
|
|
|
|
|
|
|
/* LoD */
|
|
|
|
|
prop = RNA_def_property(srna, "use_scene_hysteresis", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "lodflag", SCE_LOD_USE_HYST);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Hysteresis", "Use LoD Hysteresis setting for the scene");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "scene_hysteresis_percentage", PROP_INT, PROP_PERCENTAGE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "scehysteresis");
|
|
|
|
|
RNA_def_property_range(prop, 0, 100);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0, 100, 10, 1);
|
2015-05-02 19:46:27 +02:00
|
|
|
RNA_def_property_int_default(prop, 10);
|
2015-03-23 22:51:12 +11:00
|
|
|
RNA_def_property_ui_text(prop, "Hysteresis %",
|
|
|
|
|
"Minimum distance change required to transition to the previous level of detail");
|
2015-03-22 18:13:53 +01:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
2009-01-17 16:58:05 +00:00
|
|
|
}
|
|
|
|
|
|
2015-02-12 18:54:41 +01:00
|
|
|
static void rna_def_gpu_dof_fx(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "GPUDOFSettings", NULL);
|
|
|
|
|
RNA_def_struct_ui_text(srna, "GPU DOF", "Settings for GPU based depth of field");
|
|
|
|
|
RNA_def_struct_ui_icon(srna, ICON_RENDERLAYERS);
|
|
|
|
|
RNA_def_struct_path_func(srna, "rna_GPUDOF_path");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "focus_distance", PROP_FLOAT, PROP_DISTANCE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Focus distance", "Viewport depth of field focus distance");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 5000.0f, 1, 2);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "focal_length", PROP_FLOAT, PROP_DISTANCE_CAMERA);
|
2015-02-16 20:00:20 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Focal Length", "Focal length for dof effect");
|
2015-02-12 18:54:41 +01:00
|
|
|
RNA_def_property_range(prop, 1.0f, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 1.0f, 5000.0f, 1, 2);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "sensor", PROP_FLOAT, PROP_DISTANCE_CAMERA);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Sensor", "Size of sensor");
|
|
|
|
|
RNA_def_property_range(prop, 1.0f, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 1.0f, 5000.0f, 1, 2);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "fstop", PROP_FLOAT, PROP_NONE);
|
2015-03-23 12:48:09 +01:00
|
|
|
RNA_def_property_ui_text(prop, "F-stop", "F-stop for dof effect");
|
2015-02-12 18:54:41 +01:00
|
|
|
RNA_def_property_range(prop, 0.0f, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.1f, 128.0f, 10, 1);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
2015-03-03 17:47:31 +01:00
|
|
|
|
2015-03-20 04:00:05 +11:00
|
|
|
prop = RNA_def_property(srna, "blades", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "num_blades");
|
2015-03-23 12:48:09 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Blades", "Blades for dof effect");
|
2015-03-03 17:47:31 +01:00
|
|
|
RNA_def_property_range(prop, 0, 16);
|
|
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_GPUDOFSettings_blades_set", NULL);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2015-03-20 04:00:05 +11:00
|
|
|
prop = RNA_def_property(srna, "use_high_quality", PROP_BOOLEAN, PROP_NONE);
|
2015-03-03 17:47:31 +01:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "high_quality", 1);
|
|
|
|
|
RNA_def_property_ui_text(prop, "High Quality", "Use high quality depth of field");
|
2015-03-30 12:47:37 +02:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "is_hq_supported", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_gpu_is_hq_supported_get", NULL);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "High Quality", "Use high quality depth of field");
|
2015-03-03 17:47:31 +01:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
2015-02-12 18:54:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_gpu_ssao_fx(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "GPUSSAOSettings", NULL);
|
|
|
|
|
RNA_def_struct_ui_text(srna, "GPU SSAO", "Settings for GPU based screen space ambient occlusion");
|
|
|
|
|
RNA_def_struct_ui_icon(srna, ICON_RENDERLAYERS);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE);
|
2015-02-16 20:00:20 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Strength", "Strength of the SSAO effect");
|
2015-02-12 18:54:41 +01:00
|
|
|
RNA_def_property_range(prop, 0.0f, 250.0f);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "distance_max", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Distance", "Distance of object that contribute to the SSAO effect");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 100000.0f);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 3);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "attenuation", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Attenuation", "Attenuation constant");
|
|
|
|
|
RNA_def_property_range(prop, 1.0f, 100000.0f);
|
|
|
|
|
RNA_def_property_ui_range(prop, 1.0f, 100.0f, 1, 3);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
|
2015-02-25 23:30:50 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Samples", "Number of samples");
|
|
|
|
|
RNA_def_property_range(prop, 1, 500);
|
2015-02-12 18:54:41 +01:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
|
2015-02-13 12:15:57 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Color", "Color for screen space ambient occlusion effect");
|
2015-02-12 18:54:41 +01:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static void rna_def_gpu_fx(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
rna_def_gpu_ssao_fx(brna);
|
|
|
|
|
rna_def_gpu_dof_fx(brna);
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "GPUFXSettings", NULL);
|
|
|
|
|
RNA_def_struct_ui_text(srna, "GPU FX Settings", "Settings for GPU based compositing");
|
|
|
|
|
RNA_def_struct_ui_icon(srna, ICON_RENDERLAYERS);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "dof", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "GPUDOFSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Depth Of Field settings", "");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_dof", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "fx_flag", GPU_FX_FLAG_DOF);
|
2015-04-06 20:43:34 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Depth Of Field",
|
|
|
|
|
"Use depth of field on viewport using the values from active camera");
|
2015-02-12 18:54:41 +01:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPUFXSettings_fx_update");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "ssao", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "GPUSSAOSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Screen Space Ambient Occlusion settings", "");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_ssao", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "fx_flag", GPU_FX_FLAG_SSAO);
|
|
|
|
|
RNA_def_property_ui_text(prop, "SSAO", "Use screen space ambient occlusion of field on viewport");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPUFXSettings_fx_update");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-07-21 14:11:51 +00:00
|
|
|
static void rna_def_scene_render_layer(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
2009-10-07 05:16:23 +00:00
|
|
|
PropertyRNA *prop;
|
2009-07-21 14:11:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "SceneRenderLayer", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer");
|
2010-04-23 06:33:30 +00:00
|
|
|
RNA_def_struct_ui_icon(srna, ICON_RENDERLAYERS);
|
2012-11-17 16:10:47 +00:00
|
|
|
RNA_def_struct_path_func(srna, "rna_SceneRenderLayer_path");
|
2009-07-21 14:11:51 +00:00
|
|
|
|
|
|
|
|
rna_def_render_layer_common(srna, 1);
|
2009-10-07 05:16:23 +00:00
|
|
|
|
|
|
|
|
/* Freestyle */
|
|
|
|
|
rna_def_freestyle_settings(brna);
|
|
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "freestyle_settings", PROP_POINTER, PROP_NONE);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "freestyleConfig");
|
|
|
|
|
RNA_def_property_struct_type(prop, "FreestyleSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Freestyle Settings", "");
|
2009-07-21 14:11:51 +00:00
|
|
|
}
|
|
|
|
|
|
2013-06-01 08:49:51 +00:00
|
|
|
/* Render Layers */
|
2010-08-24 04:02:50 +00:00
|
|
|
static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2011-11-18 07:11:54 +00:00
|
|
|
FunctionRNA *func;
|
|
|
|
|
PropertyRNA *parm;
|
2010-08-24 04:02:50 +00:00
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "RenderLayers");
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "RenderLayers", NULL);
|
2010-08-24 04:02:50 +00:00
|
|
|
RNA_def_struct_sdna(srna, "RenderData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Render Layers", "Collection of render layers");
|
|
|
|
|
|
2012-12-11 14:11:46 +00:00
|
|
|
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
|
2010-08-24 04:02:50 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "actlay");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_layer_index_get",
|
|
|
|
|
"rna_RenderSettings_active_layer_index_set",
|
2011-09-26 12:08:04 +00:00
|
|
|
"rna_RenderSettings_active_layer_index_range");
|
2010-08-24 04:02:50 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2010-08-24 04:02:50 +00:00
|
|
|
|
2012-12-11 14:11:46 +00:00
|
|
|
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
|
2010-08-25 07:03:35 +00:00
|
|
|
RNA_def_property_struct_type(prop, "SceneRenderLayer");
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_RenderSettings_active_layer_get",
|
|
|
|
|
"rna_RenderSettings_active_layer_set", NULL, NULL);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
|
2010-08-25 07:03:35 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Render Layer", "Active Render Layer");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2010-08-25 07:03:35 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
func = RNA_def_function(srna, "new", "rna_RenderLayer_new");
|
2011-11-18 07:11:54 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add a render layer to scene");
|
|
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
2013-06-01 08:49:51 +00:00
|
|
|
parm = RNA_def_string(func, "name", "RenderLayer", 0, "", "New name for the render layer (not unique)");
|
2011-11-18 07:11:54 +00:00
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
2012-03-05 23:30:41 +00:00
|
|
|
parm = RNA_def_pointer(func, "result", "SceneRenderLayer", "", "Newly created render layer");
|
2011-11-18 07:11:54 +00:00
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
func = RNA_def_function(srna, "remove", "rna_RenderLayer_remove");
|
2011-11-18 07:11:54 +00:00
|
|
|
RNA_def_function_ui_description(func, "Remove a render layer");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
|
2013-06-01 08:49:51 +00:00
|
|
|
parm = RNA_def_pointer(func, "layer", "SceneRenderLayer", "", "Render layer to remove");
|
2012-11-02 09:41:26 +00:00
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
|
|
|
|
|
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
|
2010-08-24 04:02:50 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
/* Render Views - MultiView */
|
|
|
|
|
static void rna_def_scene_render_view(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "SceneRenderView", NULL);
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Scene Render View", "Render viewpoint for 3D stereo and multiview rendering");
|
|
|
|
|
RNA_def_struct_ui_icon(srna, ICON_RESTRICT_RENDER_OFF);
|
|
|
|
|
RNA_def_struct_path_func(srna, "rna_SceneRenderView_path");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderView_name_set");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Name", "Render view name");
|
|
|
|
|
RNA_def_struct_name_property(srna, prop);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "file_suffix", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_string_sdna(prop, NULL, "suffix");
|
|
|
|
|
RNA_def_property_ui_text(prop, "File Suffix", "Suffix added to the render images for this view");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "camera_suffix", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_string_sdna(prop, NULL, "suffix");
|
2015-04-06 20:43:34 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Camera Suffix",
|
|
|
|
|
"Suffix to identify the cameras to use, and added to the render images for this view");
|
2015-04-06 10:40:12 -03:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "viewflag", SCE_VIEW_DISABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render view");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_render_views(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
FunctionRNA *func;
|
|
|
|
|
PropertyRNA *parm;
|
|
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "RenderViews");
|
|
|
|
|
srna = RNA_def_struct(brna, "RenderViews", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "RenderData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Render Views", "Collection of render views");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "actview");
|
|
|
|
|
RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_view_index_get",
|
|
|
|
|
"rna_RenderSettings_active_view_index_set",
|
|
|
|
|
"rna_RenderSettings_active_view_index_range");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Active View Index", "Active index in render view array");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "SceneRenderView");
|
|
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_RenderSettings_active_view_get",
|
|
|
|
|
"rna_RenderSettings_active_view_set", NULL, NULL);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Active Render View", "Active Render View");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "new", "rna_RenderView_new");
|
|
|
|
|
RNA_def_function_ui_description(func, "Add a render view to scene");
|
|
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
|
|
|
|
parm = RNA_def_string(func, "name", "RenderView", 0, "", "New name for the marker (not unique)");
|
|
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
|
|
|
|
parm = RNA_def_pointer(func, "result", "SceneRenderView", "", "Newly created render view");
|
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "remove", "rna_RenderView_remove");
|
|
|
|
|
RNA_def_function_ui_description(func, "Remove a render view");
|
|
|
|
|
RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
|
|
|
|
|
parm = RNA_def_pointer(func, "view", "SceneRenderView", "", "Render view to remove");
|
|
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
|
|
|
|
|
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_image_format_stereo3d_format(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
/* rna_enum_stereo3d_display_items, without (S3D_DISPLAY_PAGEFLIP) */
|
2015-04-06 10:40:12 -03:00
|
|
|
static EnumPropertyItem stereo3d_display_items[] = {
|
2015-04-06 20:43:34 +02:00
|
|
|
{S3D_DISPLAY_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph",
|
2015-11-23 13:49:52 +11:00
|
|
|
"Render views for left and right eyes as two differently filtered colors in a single image "
|
|
|
|
|
"(anaglyph glasses are required)"},
|
2015-04-06 20:43:34 +02:00
|
|
|
{S3D_DISPLAY_INTERLACE, "INTERLACE", 0, "Interlace",
|
2015-11-23 13:49:52 +11:00
|
|
|
"Render views for left and right eyes interlaced in a single image (3D-ready monitor is required)"},
|
2015-04-06 20:43:34 +02:00
|
|
|
{S3D_DISPLAY_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-Side", "Render views for left and right eyes side-by-side"},
|
|
|
|
|
{S3D_DISPLAY_TOPBOTTOM, "TOPBOTTOM", 0, "Top-Bottom", "Render views for left and right eyes one above another"},
|
2015-04-06 10:40:12 -03:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "Stereo3dFormat", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "Stereo3dFormat");
|
|
|
|
|
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Stereo Output", "Settings for stereo output");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "display_mode");
|
|
|
|
|
RNA_def_property_enum_items(prop, stereo3d_display_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stereo Mode", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "anaglyph_type", PROP_ENUM, PROP_NONE);
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_stereo3d_anaglyph_type_items);
|
2015-04-06 10:40:12 -03:00
|
|
|
RNA_def_property_ui_text(prop, "Anaglyph Type", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "interlace_type", PROP_ENUM, PROP_NONE);
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_stereo3d_interlace_type_items);
|
2015-04-06 10:40:12 -03:00
|
|
|
RNA_def_property_ui_text(prop, "Interlace Type", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_interlace_swap", PROP_BOOLEAN, PROP_BOOLEAN);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", S3D_INTERLACE_SWAP);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Swap Left/Right", "Swap left and right stereo channels");
|
|
|
|
|
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_sidebyside_crosseyed", PROP_BOOLEAN, PROP_BOOLEAN);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", S3D_SIDEBYSIDE_CROSSEYED);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Cross-Eyed", "Right eye should see left image and vice-versa");
|
|
|
|
|
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_squeezed_frame", PROP_BOOLEAN, PROP_BOOLEAN);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", S3D_SQUEEZED_FRAME);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Squeezed Frame", "Combine both views in a squeezed image");
|
|
|
|
|
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
|
|
|
|
|
}
|
|
|
|
|
|
2011-11-22 10:04:28 +00:00
|
|
|
/* use for render output and image save operator,
|
|
|
|
|
* note: there are some cases where the members act differently when this is
|
|
|
|
|
* used from a scene, video formats can only be selected for render output
|
|
|
|
|
* for example, this is checked by seeing if the ptr->id.data is a Scene id */
|
2011-11-21 20:19:58 +00:00
|
|
|
|
|
|
|
|
static void rna_def_scene_image_format_data(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
|
2012-12-23 13:57:09 +00:00
|
|
|
#ifdef WITH_OPENJPEG
|
|
|
|
|
static EnumPropertyItem jp2_codec_items[] = {
|
|
|
|
|
{R_IMF_JP2_CODEC_JP2, "JP2", 0, "JP2", ""},
|
|
|
|
|
{R_IMF_JP2_CODEC_J2K, "J2K", 0, "J2K", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
#endif
|
|
|
|
|
|
2011-11-21 20:19:58 +00:00
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
rna_def_image_format_stereo3d_format(brna);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "ImageFormatSettings", NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_struct_sdna(srna, "ImageFormatData");
|
|
|
|
|
RNA_def_struct_nested(brna, srna, "Scene");
|
2012-03-05 23:30:41 +00:00
|
|
|
/* RNA_def_struct_path_func(srna, "rna_RenderSettings_path"); *//* no need for the path, its not animated! */
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Image Format", "Settings for image formats");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "imtype");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_image_type_items);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, "rna_ImageFormatSettings_file_format_set",
|
|
|
|
|
"rna_ImageFormatSettings_file_format_itemf");
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_image_color_mode_items);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_mode_itemf");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Color Mode",
|
2012-07-03 19:09:07 +00:00
|
|
|
"Choose BW for saving grayscale images, RGB for saving red, green and blue channels, "
|
2011-11-21 20:19:58 +00:00
|
|
|
"and RGBA for saving red, green, blue and alpha channels");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "color_depth", PROP_ENUM, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "depth");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_image_color_depth_items);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_depth_itemf");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Color Depth", "Bit depth per channel");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
|
|
|
|
/* was 'file_quality' */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "quality");
|
|
|
|
|
RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
|
|
|
|
|
RNA_def_property_ui_text(prop, "Quality", "Quality for image formats that support lossy compression");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
|
|
|
|
/* was shared with file_quality */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "compression", PROP_INT, PROP_PERCENTAGE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "compress");
|
|
|
|
|
RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
|
2013-11-25 16:22:55 +06:00
|
|
|
RNA_def_property_ui_text(prop, "Compression", "Amount of time to determine best compression: "
|
|
|
|
|
"0 = no compression with fast file output, "
|
|
|
|
|
"100 = maximum lossless compression with slow file output");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
|
|
|
|
/* flag */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_ZBUF);
|
2011-11-26 12:30:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Z Buffer", "Save the z-depth per pixel (32 bit unsigned int z-buffer)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_preview", PROP_BOOLEAN, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_PREVIEW_JPG);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-21 05:33:37 +00:00
|
|
|
/* format specific */
|
2011-11-21 20:19:58 +00:00
|
|
|
|
|
|
|
|
#ifdef WITH_OPENEXR
|
|
|
|
|
/* OpenEXR */
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "exr_codec");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_exr_codec_items);
|
2015-03-12 14:02:33 +01:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_exr_codec_itemf");
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_OPENJPEG
|
|
|
|
|
/* Jpeg 2000 */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_YCC);
|
|
|
|
|
RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_jpeg2k_cinema_preset", PROP_BOOLEAN, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_PRESET);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Cinema", "Use Openjpeg Cinema Preset");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_jpeg2k_cinema_48", PROP_BOOLEAN, PROP_NONE);
|
2011-11-21 23:56:32 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_48);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Cinema (48)", "Use Openjpeg Cinema Preset (48fps)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-12-23 13:57:09 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "jpeg2k_codec", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "jp2_codec");
|
|
|
|
|
RNA_def_property_enum_items(prop, jp2_codec_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Codec", "Codec settings for Jpek2000");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Cineon and DPX */
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE);
|
Patch #27397: Improved DPX/Cineon code
Patch by Julien Enche, thanks!
From the patch comment:
It allows Blender to load:
- 1, 8, 10, 12 and 16 bits files. For 10 and 12 bits files, packed or
filled type A/B are supported.
- RGB, Log, Luma and YCbCr colorspaces.
- Big and little endian storage.
- Multi-elements (planar) storage.
It allows Blender to save :
- 8, 10, 12 and 16 bits file. For 10 and 12 bits files, the most used
type A padding is used.
- RGB and Log colorspaces (Cineon can only be saved in Log colorspace).
For Log colorspace, the common default values are used for gamma,
reference black and reference white (respectively 1.7, 95 and 685 for
10 bits files).
- Saved DPX/Cineon files now match the viewer.
Some files won't load (mostly because I haven't seen any of them):
- Compressed files
- 32 and 64 bits files
- Image orientation information are not taken in account. Here too,
I haven't seen any file that was not top-bottom/left-right oriented.
2012-10-22 12:49:00 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "cineon_flag", R_IMF_CINEON_FLAG_LOG);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "cineon_black");
|
|
|
|
|
RNA_def_property_range(prop, 0, 1024);
|
|
|
|
|
RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "cineon_white");
|
|
|
|
|
RNA_def_property_range(prop, 0, 1024);
|
|
|
|
|
RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "cineon_gamma");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 10.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
/* multiview */
|
|
|
|
|
prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "views_format");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_views_format_items);
|
2015-04-06 10:40:12 -03:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_views_format_itemf");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Views Format", "Format of multiview media");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "stereo3d_format");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "Stereo3dFormat");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stereo 3D Format", "Settings for stereo 3d");
|
|
|
|
|
|
Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
|
|
|
/* color management */
|
|
|
|
|
prop = RNA_def_property(srna, "view_settings", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "view_settings");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ColorManagedViewSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "View Settings", "Color management settings applied on image before saving");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "display_settings", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "display_settings");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ColorManagedDisplaySettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Display Settings", "Settings of device saved image would be displayed on");
|
2011-11-21 20:19:58 +00:00
|
|
|
}
|
|
|
|
|
|
2012-01-13 12:34:41 +00:00
|
|
|
static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_FFMPEG
|
|
|
|
|
static EnumPropertyItem ffmpeg_format_items[] = {
|
|
|
|
|
{FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
|
|
|
|
|
{FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
|
|
|
|
|
{FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
|
|
|
|
|
{FFMPEG_AVI, "AVI", 0, "AVI", ""},
|
|
|
|
|
{FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
|
|
|
|
|
{FFMPEG_DV, "DV", 0, "DV", ""},
|
|
|
|
|
{FFMPEG_H264, "H264", 0, "H.264", ""},
|
|
|
|
|
{FFMPEG_XVID, "XVID", 0, "Xvid", ""},
|
|
|
|
|
{FFMPEG_OGG, "OGG", 0, "Ogg", ""},
|
|
|
|
|
{FFMPEG_MKV, "MKV", 0, "Matroska", ""},
|
|
|
|
|
{FFMPEG_FLV, "FLASH", 0, "Flash", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem ffmpeg_codec_items[] = {
|
2014-01-16 15:40:37 +01:00
|
|
|
{AV_CODEC_ID_NONE, "NONE", 0, "None", ""},
|
|
|
|
|
{AV_CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
|
|
|
|
|
{AV_CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
|
|
|
|
|
{AV_CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""},
|
|
|
|
|
{AV_CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
|
|
|
|
|
{AV_CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
|
|
|
|
|
{AV_CODEC_ID_H264, "H264", 0, "H.264", ""},
|
|
|
|
|
{AV_CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
|
|
|
|
|
{AV_CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
|
|
|
|
|
{AV_CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""},
|
|
|
|
|
{AV_CODEC_ID_QTRLE, "QTRLE", 0, "QT rle / QT Animation", ""},
|
|
|
|
|
{AV_CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""},
|
|
|
|
|
{AV_CODEC_ID_PNG, "PNG", 0, "PNG", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem ffmpeg_audio_codec_items[] = {
|
2014-01-16 15:40:37 +01:00
|
|
|
{AV_CODEC_ID_NONE, "NONE", 0, "None", ""},
|
|
|
|
|
{AV_CODEC_ID_MP2, "MP2", 0, "MP2", ""},
|
|
|
|
|
{AV_CODEC_ID_MP3, "MP3", 0, "MP3", ""},
|
|
|
|
|
{AV_CODEC_ID_AC3, "AC3", 0, "AC3", ""},
|
|
|
|
|
{AV_CODEC_ID_AAC, "AAC", 0, "AAC", ""},
|
|
|
|
|
{AV_CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
|
|
|
|
|
{AV_CODEC_ID_FLAC, "FLAC", 0, "FLAC", ""},
|
|
|
|
|
{AV_CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-13 12:34:41 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem audio_channel_items[] = {
|
|
|
|
|
{1, "MONO", 0, "Mono", "Set audio channels to mono"},
|
|
|
|
|
{2, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
|
|
|
|
|
{4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
|
|
|
|
|
{6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
|
|
|
|
|
{8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "FFmpegSettings", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "FFMpegCodecData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "FFmpeg Settings", "FFmpeg related settings for the scene");
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_FFMPEG
|
|
|
|
|
prop = RNA_def_property(srna, "format", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "type");
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_enum_items(prop, ffmpeg_format_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Format", "Output file format");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec");
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_enum_items(prop, ffmpeg_codec_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Codec", "FFmpeg codec to use");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "video_bitrate");
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate (kb/s)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "minrate", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "rc_min_rate");
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate (kb/s)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "maxrate", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "rc_max_rate");
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate (kb/s)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "muxrate", PROP_INT, PROP_NONE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "mux_rate");
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_range(prop, 0, 100000000);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "gopsize", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "gop_size");
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_range(prop, 0, 100);
|
|
|
|
|
RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "buffersize", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "rc_buffer_size");
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_range(prop, 0, 2000);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "packetsize", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "mux_packet_size");
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_range(prop, 0, 16384);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_autosplit", PROP_BOOLEAN, PROP_NONE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_AUTOSPLIT_OUTPUT);
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_lossless_output", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_LOSSLESS_OUTPUT);
|
2012-02-15 14:05:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_FFmpegSettings_lossless_output_set");
|
2012-01-15 09:20:29 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lossless Output", "Use lossless output for video streams");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
/* FFMPEG Audio*/
|
|
|
|
|
prop = RNA_def_property(srna, "audio_codec", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio_codec");
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
|
RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Audio Codec", "FFmpeg audio codec to use");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "audio_bitrate", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "audio_bitrate");
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
|
RNA_def_property_range(prop, 32, 384);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate (kb/s)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "audio_volume");
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Volume", "Audio volume");
|
2015-08-16 17:32:01 +10:00
|
|
|
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
#endif
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/* the following two "ffmpeg" settings are general audio settings */
|
|
|
|
|
prop = RNA_def_property(srna, "audio_mixrate", PROP_INT, PROP_NONE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "audio_mixrate");
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
|
RNA_def_property_range(prop, 8000, 192000);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "audio_channels");
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
|
RNA_def_property_enum_items(prop, audio_channel_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_QUICKTIME
|
|
|
|
|
static void rna_def_scene_quicktime_settings(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static EnumPropertyItem quicktime_codec_type_items[] = {
|
|
|
|
|
{0, "codec", 0, "codec", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem quicktime_audio_samplerate_items[] = {
|
|
|
|
|
{22050, "22050", 0, "22kHz", ""},
|
|
|
|
|
{44100, "44100", 0, "44.1kHz", ""},
|
|
|
|
|
{48000, "48000", 0, "48kHz", ""},
|
|
|
|
|
{88200, "88200", 0, "88.2kHz", ""},
|
|
|
|
|
{96000, "96000", 0, "96kHz", ""},
|
|
|
|
|
{192000, "192000", 0, "192kHz", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem quicktime_audio_bitdepth_items[] = {
|
|
|
|
|
{AUD_FORMAT_U8, "8BIT", 0, "8bit", ""},
|
|
|
|
|
{AUD_FORMAT_S16, "16BIT", 0, "16bit", ""},
|
|
|
|
|
{AUD_FORMAT_S24, "24BIT", 0, "24bit", ""},
|
|
|
|
|
{AUD_FORMAT_S32, "32BIT", 0, "32bit", ""},
|
|
|
|
|
{AUD_FORMAT_FLOAT32, "FLOAT32", 0, "float32", ""},
|
|
|
|
|
{AUD_FORMAT_FLOAT64, "FLOAT64", 0, "float64", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem quicktime_audio_bitrate_items[] = {
|
|
|
|
|
{64000, "64000", 0, "64kbps", ""},
|
|
|
|
|
{112000, "112000", 0, "112kpbs", ""},
|
|
|
|
|
{128000, "128000", 0, "128kbps", ""},
|
|
|
|
|
{192000, "192000", 0, "192kbps", ""},
|
|
|
|
|
{256000, "256000", 0, "256kbps", ""},
|
|
|
|
|
{320000, "320000", 0, "320kbps", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
/* QuickTime */
|
|
|
|
|
srna = RNA_def_struct(brna, "QuickTimeSettings", NULL);
|
2012-01-13 14:56:51 +00:00
|
|
|
RNA_def_struct_sdna(srna, "QuicktimeCodecSettings");
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "QuickTime Settings", "QuickTime related settings for the scene");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "codec_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "codecType");
|
|
|
|
|
RNA_def_property_enum_items(prop, quicktime_codec_type_items);
|
|
|
|
|
RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_codecType_get",
|
2012-05-10 15:22:29 +00:00
|
|
|
"rna_RenderSettings_qtcodecsettings_codecType_set",
|
|
|
|
|
"rna_RenderSettings_qtcodecsettings_codecType_itemf");
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Codec", "QuickTime codec type");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "codec_spatial_quality", PROP_INT, PROP_PERCENTAGE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "codecSpatialQuality");
|
|
|
|
|
RNA_def_property_range(prop, 0, 100);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Spatial quality", "Intra-frame spatial quality level");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "audiocodec_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audiocodecType");
|
|
|
|
|
RNA_def_property_enum_items(prop, quicktime_codec_type_items);
|
|
|
|
|
RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_audiocodecType_get",
|
2012-05-10 15:22:29 +00:00
|
|
|
"rna_RenderSettings_qtcodecsettings_audiocodecType_set",
|
|
|
|
|
"rna_RenderSettings_qtcodecsettings_audiocodecType_itemf");
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Audio Codec", "QuickTime audio codec type");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "audio_samplerate", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioSampleRate");
|
|
|
|
|
RNA_def_property_enum_items(prop, quicktime_audio_samplerate_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Smp Rate", "Sample Rate");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "audio_bitdepth", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioBitDepth");
|
|
|
|
|
RNA_def_property_enum_items(prop, quicktime_audio_bitdepth_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Bit Depth", "Bit Depth");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "audio_resampling_hq", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "audioCodecFlags", QTAUDIO_FLAG_RESAMPLE_NOHQ);
|
|
|
|
|
RNA_def_property_ui_text(prop, "HQ", "Use High Quality resampling algorithm");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "audio_codec_isvbr", PROP_BOOLEAN, PROP_NONE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "audioCodecFlags", QTAUDIO_FLAG_CODEC_ISCBR);
|
|
|
|
|
RNA_def_property_ui_text(prop, "VBR", "Use Variable Bit Rate compression (improves quality at same bitrate)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "audio_bitrate", PROP_ENUM, PROP_NONE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioBitRate");
|
|
|
|
|
RNA_def_property_enum_items(prop, quicktime_audio_bitrate_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Bitrate", "Compressed audio bitrate");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2012-01-13 12:34:41 +00:00
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2009-07-21 14:11:51 +00:00
|
|
|
static void rna_def_scene_render_data(BlenderRNA *brna)
|
2009-02-20 06:05:00 +00:00
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static EnumPropertyItem pixel_filter_items[] = {
|
2011-05-15 17:59:48 +00:00
|
|
|
{R_FILTER_BOX, "BOX", 0, "Box", "Use a box filter for anti-aliasing"},
|
|
|
|
|
{R_FILTER_TENT, "TENT", 0, "Tent", "Use a tent filter for anti-aliasing"},
|
|
|
|
|
{R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", "Use a quadratic filter for anti-aliasing"},
|
|
|
|
|
{R_FILTER_CUBIC, "CUBIC", 0, "Cubic", "Use a cubic filter for anti-aliasing"},
|
|
|
|
|
{R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", "Use a Catmull-Rom filter for anti-aliasing"},
|
|
|
|
|
{R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", "Use a Gaussian filter for anti-aliasing"},
|
|
|
|
|
{R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", "Use a Mitchell-Netravali filter for anti-aliasing"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static EnumPropertyItem alpha_mode_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with sky color"},
|
2012-12-31 13:52:13 +00:00
|
|
|
{R_ALPHAPREMUL, "TRANSPARENT", 0, "Transparent", "World background is transparent with premultiplied alpha"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2011-08-24 00:44:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static EnumPropertyItem display_mode_items[] = {
|
2009-07-10 16:55:49 +00:00
|
|
|
{R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are rendered in full Screen"},
|
|
|
|
|
{R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered in Image Editor"},
|
|
|
|
|
{R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendered in new Window"},
|
2012-03-02 21:14:37 +00:00
|
|
|
{R_OUTPUT_NONE, "NONE", 0, "Keep UI", "Images are rendered without forcing UI changes"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-07-10 16:55:49 +00:00
|
|
|
|
2009-08-26 15:13:58 +00:00
|
|
|
/* Bake */
|
2012-03-05 23:30:41 +00:00
|
|
|
static EnumPropertyItem bake_mode_items[] = {
|
2011-05-15 17:59:48 +00:00
|
|
|
{RE_BAKE_ALL, "FULL", 0, "Full Render", "Bake everything"},
|
|
|
|
|
{RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusion"},
|
|
|
|
|
{RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", "Bake shadows"},
|
|
|
|
|
{RE_BAKE_NORMALS, "NORMALS", 0, "Normals", "Bake normals"},
|
|
|
|
|
{RE_BAKE_TEXTURE, "TEXTURE", 0, "Textures", "Bake textures"},
|
|
|
|
|
{RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Bake displacement"},
|
2013-10-09 15:51:14 +00:00
|
|
|
{RE_BAKE_DERIVATIVE, "DERIVATIVE", 0, "Derivative", "Bake derivative map"},
|
2013-10-10 11:00:12 +00:00
|
|
|
{RE_BAKE_VERTEX_COLORS, "VERTEX_COLORS", 0, "Vertex Colors", "Bake vertex colors"},
|
2011-05-18 07:46:54 +00:00
|
|
|
{RE_BAKE_EMIT, "EMIT", 0, "Emission", "Bake Emit values (glow)"},
|
|
|
|
|
{RE_BAKE_ALPHA, "ALPHA", 0, "Alpha", "Bake Alpha values (transparency)"},
|
|
|
|
|
{RE_BAKE_MIRROR_INTENSITY, "MIRROR_INTENSITY", 0, "Mirror Intensity", "Bake Mirror values"},
|
|
|
|
|
{RE_BAKE_MIRROR_COLOR, "MIRROR_COLOR", 0, "Mirror Colors", "Bake Mirror colors"},
|
|
|
|
|
{RE_BAKE_SPEC_INTENSITY, "SPEC_INTENSITY", 0, "Specular Intensity", "Bake Specular values"},
|
|
|
|
|
{RE_BAKE_SPEC_COLOR, "SPEC_COLOR", 0, "Specular Colors", "Bake Specular colors"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-08-26 15:13:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static EnumPropertyItem bake_normal_space_items[] = {
|
2011-05-15 17:59:48 +00:00
|
|
|
{R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", "Bake the normals in camera space"},
|
|
|
|
|
{R_BAKE_SPACE_WORLD, "WORLD", 0, "World", "Bake the normals in world space"},
|
|
|
|
|
{R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"},
|
|
|
|
|
{R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normals in tangent space"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-12-31 10:07:59 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static EnumPropertyItem bake_qyad_split_items[] = {
|
2009-12-31 10:07:59 +00:00
|
|
|
{0, "AUTO", 0, "Automatic", "Split quads to give the least distortion while baking"},
|
2010-03-16 18:22:55 +00:00
|
|
|
{1, "FIXED", 0, "Fixed", "Split quads predictably (0,1,2) (0,2,3)"},
|
|
|
|
|
{2, "FIXED_ALT", 0, "Fixed Alternate", "Split quads predictably (1,2,3) (1,3,0)"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-08-26 15:13:58 +00:00
|
|
|
|
2009-02-20 06:05:00 +00:00
|
|
|
static EnumPropertyItem octree_resolution_items[] = {
|
2010-03-16 18:22:55 +00:00
|
|
|
{64, "64", 0, "64", ""},
|
|
|
|
|
{128, "128", 0, "128", ""},
|
|
|
|
|
{256, "256", 0, "256", ""},
|
|
|
|
|
{512, "512", 0, "512", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-06-29 19:48:11 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem raytrace_structure_items[] = {
|
2011-05-15 17:59:48 +00:00
|
|
|
{R_RAYSTRUCTURE_AUTO, "AUTO", 0, "Auto", "Automatically select acceleration structure"},
|
2010-02-11 01:11:52 +00:00
|
|
|
{R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, "Octree", "Use old Octree structure"},
|
2011-05-15 17:59:48 +00:00
|
|
|
{R_RAYSTRUCTURE_VBVH, "VBVH", 0, "vBVH", "Use vBVH"},
|
|
|
|
|
{R_RAYSTRUCTURE_SIMD_SVBVH, "SIMD_SVBVH", 0, "SIMD SVBVH", "Use SIMD SVBVH"},
|
|
|
|
|
{R_RAYSTRUCTURE_SIMD_QBVH, "SIMD_QBVH", 0, "SIMD QBVH", "Use SIMD QBVH"},
|
2009-09-06 19:14:06 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
2012-05-10 15:22:29 +00:00
|
|
|
};
|
2009-07-06 13:27:40 +00:00
|
|
|
|
2009-02-20 06:05:00 +00:00
|
|
|
static EnumPropertyItem fixed_oversample_items[] = {
|
2010-03-16 18:22:55 +00:00
|
|
|
{5, "5", 0, "5", ""},
|
|
|
|
|
{8, "8", 0, "8", ""},
|
|
|
|
|
{11, "11", 0, "11", ""},
|
|
|
|
|
{16, "16", 0, "16", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-04-20 04:58:22 +00:00
|
|
|
|
2009-02-20 06:05:00 +00:00
|
|
|
static EnumPropertyItem field_order_items[] = {
|
2010-03-16 18:22:55 +00:00
|
|
|
{0, "EVEN_FIRST", 0, "Upper First", "Upper field first"},
|
|
|
|
|
{R_ODDFIELD, "ODD_FIRST", 0, "Lower First", "Lower field first"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-02-20 06:05:00 +00:00
|
|
|
|
|
|
|
|
static EnumPropertyItem threads_mode_items[] = {
|
2010-03-16 18:22:55 +00:00
|
|
|
{0, "AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
|
|
|
|
|
{R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2011-08-30 08:22:03 +00:00
|
|
|
|
2009-07-21 20:28:32 +00:00
|
|
|
static EnumPropertyItem engine_items[] = {
|
2011-05-15 17:59:48 +00:00
|
|
|
{0, "BLENDER_RENDER", 0, "Blender Render", "Use the Blender internal rendering engine for rendering"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-06-10 20:50:23 +00:00
|
|
|
|
2012-04-10 23:53:46 +00:00
|
|
|
static EnumPropertyItem freestyle_thickness_items[] = {
|
|
|
|
|
{R_LINE_THICKNESS_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Specify unit line thickness in pixels"},
|
2012-12-11 22:00:22 +00:00
|
|
|
{R_LINE_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative",
|
|
|
|
|
"Unit line thickness is scaled by the proportion of the present vertical image "
|
2013-04-05 16:55:12 +00:00
|
|
|
"resolution to 480 pixels"},
|
2012-04-10 23:53:46 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}};
|
|
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
static EnumPropertyItem views_format_items[] = {
|
|
|
|
|
{SCE_VIEWS_FORMAT_STEREO_3D, "STEREO_3D", 0, "Stereo 3D",
|
|
|
|
|
"Single stereo camera system, adjust the stereo settings in the camera panel"},
|
|
|
|
|
{SCE_VIEWS_FORMAT_MULTIVIEW, "MULTIVIEW", 0, "Multi-View",
|
|
|
|
|
"Multi camera system, adjust the cameras individually"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-01-13 12:34:41 +00:00
|
|
|
rna_def_scene_ffmpeg_settings(brna);
|
|
|
|
|
#ifdef WITH_QUICKTIME
|
|
|
|
|
rna_def_scene_quicktime_settings(brna);
|
|
|
|
|
#endif
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "RenderSettings", NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_struct_sdna(srna, "RenderData");
|
|
|
|
|
RNA_def_struct_nested(brna, srna, "Scene");
|
2010-02-23 12:48:35 +00:00
|
|
|
RNA_def_struct_path_func(srna, "rna_RenderSettings_path");
|
2015-10-24 02:44:43 +11:00
|
|
|
RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene data-block");
|
2011-11-21 20:19:58 +00:00
|
|
|
|
|
|
|
|
/* Render Data */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE);
|
2011-11-21 20:19:58 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "im_format");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ImageFormatSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Image Format", "");
|
2009-09-16 18:22:53 +00:00
|
|
|
|
2013-12-13 04:39:15 +11:00
|
|
|
prop = RNA_def_property(srna, "resolution_x", PROP_INT, PROP_PIXEL);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "xsch");
|
2014-02-09 08:42:45 +11:00
|
|
|
RNA_def_property_flag(prop, PROP_PROPORTIONAL);
|
2012-01-29 10:21:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2013-02-21 18:07:56 +00:00
|
|
|
RNA_def_property_range(prop, 4, 65536);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2013-12-13 04:39:15 +11:00
|
|
|
prop = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_PIXEL);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "ysch");
|
2014-02-09 08:42:45 +11:00
|
|
|
RNA_def_property_flag(prop, PROP_PROPORTIONAL);
|
2012-01-29 10:21:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2013-02-21 18:07:56 +00:00
|
|
|
RNA_def_property_range(prop, 4, 65536);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "size");
|
2012-01-29 10:21:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-03-04 17:01:33 +00:00
|
|
|
RNA_def_property_range(prop, 1, SHRT_MAX);
|
UI:
* Added support for soft/hard range in the buttons code. Currently
it works by only allowing to drag or click increment in the soft
range, but typing a number value allows to go outside it.
If the number is outside the soft range, the range will be extended,
rounded to values like:
.., 0.1, 0.2, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 50.0, ..
2009-03-29 18:44:49 +00:00
|
|
|
RNA_def_property_ui_range(prop, 1, 100, 10, 1);
|
2009-06-11 18:19:08 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-11-05 08:05:14 +00:00
|
|
|
prop = RNA_def_property(srna, "tile_x", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "tilex");
|
2013-08-19 13:30:17 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2013-02-21 18:07:56 +00:00
|
|
|
RNA_def_property_range(prop, 8, 65536);
|
2012-11-05 08:05:14 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tile X", "Horizontal tile size to use while rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-11-05 08:05:14 +00:00
|
|
|
prop = RNA_def_property(srna, "tile_y", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "tiley");
|
2013-08-19 13:30:17 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2013-02-21 18:07:56 +00:00
|
|
|
RNA_def_property_range(prop, 8, 65536);
|
2012-11-05 08:05:14 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Tile Y", "Vertical tile size to use while rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2014-07-09 19:02:07 +06:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "preview_start_resolution", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
|
RNA_def_property_range(prop, 8, 16384);
|
|
|
|
|
RNA_def_property_int_default(prop, 64);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Start Resolution", "Resolution to start rendering preview at, "
|
|
|
|
|
"progressively increasing it to the full viewport size");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "xasp");
|
2014-02-09 08:42:45 +11:00
|
|
|
RNA_def_property_flag(prop, PROP_PROPORTIONAL);
|
2012-01-29 10:21:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_range(prop, 1.0f, 200.0f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Pixel Aspect X",
|
|
|
|
|
"Horizontal aspect ratio - for anamorphic or non-square pixel output");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
|
2009-04-20 04:58:22 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "yasp");
|
2014-02-09 08:42:45 +11:00
|
|
|
RNA_def_property_flag(prop, PROP_PROPORTIONAL);
|
2012-01-29 10:21:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_range(prop, 1.0f, 200.0f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Pixel Aspect Y",
|
|
|
|
|
"Vertical aspect ratio - for anamorphic or non-square pixel output");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
|
2009-06-10 20:50:23 +00:00
|
|
|
|
2009-11-20 10:37:50 +00:00
|
|
|
#ifdef WITH_QUICKTIME
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "quicktime", PROP_POINTER, PROP_NONE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_struct_type(prop, "QuickTimeSettings");
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "qtcodecsettings");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_UNLINK);
|
|
|
|
|
RNA_def_property_ui_text(prop, "QuickTime Settings", "QuickTime related settings for the scene");
|
2009-06-10 20:50:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "ffmpeg", PROP_POINTER, PROP_NONE);
|
2012-01-13 12:34:41 +00:00
|
|
|
RNA_def_property_struct_type(prop, "FFmpegSettings");
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "ffcodecdata");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_UNLINK);
|
|
|
|
|
RNA_def_property_ui_text(prop, "FFmpeg Settings", "FFmpeg related settings for the scene");
|
2009-06-10 20:50:23 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
|
2009-04-20 04:58:22 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "frs_sec");
|
2010-02-05 21:23:07 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-04-20 04:58:22 +00:00
|
|
|
RNA_def_property_range(prop, 1, 120);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_fps_update");
|
2009-04-20 04:58:22 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
|
2009-04-20 04:58:22 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
|
2010-02-05 21:23:07 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-04-20 04:58:22 +00:00
|
|
|
RNA_def_property_range(prop, 0.1f, 120.0f);
|
2009-06-11 18:19:08 +00:00
|
|
|
RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_fps_update");
|
2009-04-20 04:58:22 +00:00
|
|
|
|
2010-09-19 13:38:45 +00:00
|
|
|
/* frame mapping */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_map_old", PROP_INT, PROP_NONE);
|
2010-09-19 13:38:45 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "framapto");
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
|
RNA_def_property_range(prop, 1, 900);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Frame Map Old", "Old mapping value in frames");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_framelen_update");
|
2010-09-19 13:38:45 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_map_new", PROP_INT, PROP_NONE);
|
2010-09-19 13:38:45 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "images");
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
|
RNA_def_property_range(prop, 1, 900);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Frame Map New", "How many frames the Map Old will last");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_framelen_update");
|
2010-09-19 13:38:45 +00:00
|
|
|
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "dither_intensity");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 2.0f);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Dither Intensity",
|
|
|
|
|
"Amount of dithering noise added to the rendered image to break up banding");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "pixel_filter_type", PROP_ENUM, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "filtertype");
|
|
|
|
|
RNA_def_property_enum_items(prop, pixel_filter_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter used for combining anti-aliasing samples");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2013-12-13 17:03:44 +01:00
|
|
|
prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_PIXEL);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "gauss");
|
|
|
|
|
RNA_def_property_range(prop, 0.5f, 1.5f);
|
2013-12-13 17:03:44 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Filter Size", "Width over which the reconstruction filter combines samples");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "alphamode");
|
|
|
|
|
RNA_def_property_enum_items(prop, alpha_mode_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels");
|
2014-09-29 12:49:51 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "ocres");
|
|
|
|
|
RNA_def_property_enum_items(prop, octree_resolution_items);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Octree Resolution",
|
|
|
|
|
"Resolution of raytrace accelerator, use higher resolutions for larger scenes");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-06-29 19:48:11 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "raytrace_method", PROP_ENUM, PROP_NONE);
|
2009-10-01 18:30:59 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "raytrace_structure");
|
2009-06-29 19:48:11 +00:00
|
|
|
RNA_def_property_enum_items(prop, raytrace_structure_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type of raytrace accelerator structure");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-07-06 13:27:40 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE);
|
2009-10-01 18:30:59 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_INSTANCES);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Instances",
|
|
|
|
|
"Instance support leads to effective memory reduction when using duplicates");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-10-01 18:30:59 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
|
2009-10-01 18:30:59 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE_USE_LOCAL_COORDS);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Local Coords",
|
2012-03-02 21:14:37 +00:00
|
|
|
"Vertex coordinates are stored locally on each primitive "
|
2011-09-26 12:08:04 +00:00
|
|
|
"(increases memory usage, but may have impact on speed)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-10-01 18:30:59 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Anti-Aliasing",
|
|
|
|
|
"Render and combine multiple samples per pixel to prevent jagged edges");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "osa");
|
|
|
|
|
RNA_def_property_enum_items(prop, fixed_oversample_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-aliasing samples per pixel");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per frame, for interlaced TV output");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
|
|
|
|
|
RNA_def_property_enum_items(prop, field_order_items);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Field Order",
|
|
|
|
|
"Order of video fields (select which lines get rendered first, "
|
|
|
|
|
"to create smooth motion for TV output)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_fields_still", PROP_BOOLEAN, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2010-05-19 08:26:33 +00:00
|
|
|
/* rendering features */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
|
2010-05-19 08:26:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Shadows", "Calculate shadows while rendering");
|
2014-09-29 12:49:51 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_envmaps", PROP_BOOLEAN, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP);
|
2010-05-19 08:26:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Environment Maps", "Calculate environment maps while rendering");
|
2014-09-29 12:49:51 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_sss", PROP_BOOLEAN, PROP_NONE);
|
2009-03-11 00:24:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS);
|
2010-05-19 08:26:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Subsurface Scattering", "Calculate sub-surface scattering in materials rendering");
|
2014-09-29 12:49:51 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-03-11 00:24:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Raytracing",
|
|
|
|
|
"Pre-calculate the raytrace accelerator and render raytracing effects");
|
2014-09-29 12:49:51 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX);
|
2010-05-19 08:26:33 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Textures", "Use textures to affect material properties");
|
2014-09-29 12:49:51 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2014-01-27 19:58:54 +01:00
|
|
|
prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the edges of geometry");
|
2014-09-29 12:49:51 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2014-01-27 19:58:54 +01:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "edgeint");
|
|
|
|
|
RNA_def_property_range(prop, 0, 255);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing outlines on geometry edges");
|
2014-09-29 12:49:51 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2014-01-27 19:58:54 +01:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "edgeR");
|
|
|
|
|
RNA_def_property_array(prop, 3);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Edge Color", "Edge color");
|
2014-09-29 12:49:51 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2014-01-27 19:58:54 +01:00
|
|
|
|
2012-12-11 22:00:22 +00:00
|
|
|
prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
|
2015-02-04 21:20:35 +01:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-10-07 05:16:23 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE_FRS);
|
2011-10-30 09:05:47 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Edge", "Draw stylized strokes using Freestyle");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2009-10-07 05:16:23 +00:00
|
|
|
|
2010-04-15 10:28:32 +00:00
|
|
|
/* threads */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "threads");
|
2010-01-28 19:18:35 +00:00
|
|
|
RNA_def_property_range(prop, 1, BLENDER_MAX_THREADS);
|
2010-02-23 12:48:35 +00:00
|
|
|
RNA_def_property_int_funcs(prop, "rna_RenderSettings_threads_get", NULL, NULL);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Threads",
|
2012-03-18 09:27:36 +00:00
|
|
|
"Number of CPU threads to use simultaneously while rendering "
|
|
|
|
|
"(for multi-core/CPU systems)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
|
|
|
|
|
RNA_def_property_enum_items(prop, threads_mode_items);
|
2013-05-08 13:23:17 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, "rna_RenderSettings_threads_mode_get", NULL, NULL);
|
2009-06-11 18:19:08 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2010-04-15 10:28:32 +00:00
|
|
|
/* motion blur */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
|
2009-03-11 00:24:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
|
2010-02-06 20:25:17 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur");
|
2012-02-01 18:25:01 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-10-15 21:12:58 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2010-02-06 20:25:17 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE);
|
2010-02-06 20:25:17 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "mblur_samples");
|
|
|
|
|
RNA_def_property_range(prop, 1, 32);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Motion Samples", "Number of scene samples to take with motion blur");
|
2012-02-01 18:25:01 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-10-15 21:12:58 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2009-03-11 00:24:34 +00:00
|
|
|
|
2012-12-31 13:07:06 +00:00
|
|
|
prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_UNSIGNED);
|
2010-06-23 03:20:57 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "blurfac");
|
2013-03-26 01:46:12 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.01f, 2.0f, 1, 2);
|
2010-06-23 03:20:57 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Shutter", "Time taken in frames between shutter open and close");
|
2012-04-10 15:43:42 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-10-15 21:12:58 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
|
2015-10-27 19:00:51 +05:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "motion_blur_shutter_curve", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "mblur_shutter_curve");
|
|
|
|
|
RNA_def_property_struct_type(prop, "CurveMapping");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Shutter Curve", "Curve defining the shutter's openness over time");
|
2010-06-23 03:20:57 +00:00
|
|
|
|
2010-04-15 10:28:32 +00:00
|
|
|
/* border */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
|
2009-03-11 00:24:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER);
|
2012-01-29 10:21:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Border",
|
|
|
|
|
"Render a user-defined border region, within the frame size "
|
|
|
|
|
"(note that this disables save_buffers and full_sample)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-09-21 16:51:04 +00:00
|
|
|
|
2013-02-03 10:26:51 +00:00
|
|
|
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
|
2009-09-21 16:51:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "border.xmin");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2013-02-03 10:26:51 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2015-07-15 03:33:10 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Border Minimum X", "Minimum X value for the render border");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-09-21 16:51:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE);
|
2009-09-21 16:51:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "border.ymin");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2013-02-03 10:26:51 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Border Minimum Y", "Minimum Y value for the render border");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-09-21 16:51:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "border_max_x", PROP_FLOAT, PROP_NONE);
|
2009-09-21 16:51:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "border.xmax");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2013-02-03 10:26:51 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Border Maximum X", "Maximum X value for the render border");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-09-21 16:51:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "border_max_y", PROP_FLOAT, PROP_NONE);
|
2009-09-21 16:51:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "border.ymax");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2013-02-03 10:26:51 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Border Maximum Y", "Maximum Y value for the render border");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-03-11 00:24:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_crop_to_border", PROP_BOOLEAN, PROP_NONE);
|
2009-03-11 00:24:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
|
2012-01-29 10:21:28 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered frame to the defined border size");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-03-11 00:24:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
|
2009-03-11 00:24:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Placeholders",
|
|
|
|
|
"Create empty placeholder files while rendering frames (similar to Unix 'touch')");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-03-11 00:24:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
|
2009-08-28 15:03:49 +00:00
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRITE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-03-11 00:24:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
|
2009-03-11 00:24:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
|
2012-06-07 10:55:53 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Compositing",
|
2012-03-18 09:27:36 +00:00
|
|
|
"Process the render result through the compositing pipeline, "
|
|
|
|
|
"if compositing nodes are enabled");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-03-11 00:24:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
|
2009-03-11 00:24:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
|
2012-06-07 10:55:53 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Sequencer",
|
|
|
|
|
"Process the render (and composited) result through the video sequence "
|
|
|
|
|
"editor pipeline, if sequencer strips exist");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-03-11 00:24:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_NONE);
|
2009-03-11 00:24:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "File Extensions",
|
|
|
|
|
"Add the file format extensions to the rendered file name (eg: filename + .jpg)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
|
|
|
|
|
#if 0 /* moved */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
|
2009-05-01 11:57:14 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "imtype");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_image_type_items);
|
2010-02-23 12:48:35 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_file_format_set", NULL);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-11-21 20:19:58 +00:00
|
|
|
#endif
|
2010-01-08 13:52:38 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "file_extension", PROP_STRING, PROP_NONE);
|
2010-01-08 13:52:38 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_SceneRender_file_ext_get", "rna_SceneRender_file_ext_length", NULL);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Extension", "The file extension used for saving renders");
|
2010-01-08 13:52:38 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "is_movie_format", PROP_BOOLEAN, PROP_NONE);
|
2014-12-03 12:24:57 +09:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_is_movie_format_get", NULL);
|
2010-03-07 02:04:30 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Movie Format", "When true the format is a movie");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_free_image_textures", PROP_BOOLEAN, PROP_NONE);
|
2009-03-11 00:24:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Free Image Textures",
|
2012-03-02 21:14:37 +00:00
|
|
|
"Free all image textures from memory after render, to save memory before compositing");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-08-19 00:55:30 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_free_unused_nodes", PROP_BOOLEAN, PROP_NONE);
|
2010-06-15 21:51:15 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_COMP_FREE);
|
2012-03-02 21:14:37 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Free Unused Nodes",
|
|
|
|
|
"Free Nodes that are not used while compositing, to save memory");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-08-19 00:55:30 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_save_buffers", PROP_BOOLEAN, PROP_NONE);
|
2009-04-20 04:58:22 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
|
2010-02-23 12:48:35 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_save_buffers_get", NULL);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Save Buffers",
|
|
|
|
|
"Save tiles for all RenderLayers and SceneNodes to files in the temp directory "
|
|
|
|
|
"(saves memory, required for Full Sample)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-04-20 04:58:22 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_full_sample", PROP_BOOLEAN, PROP_NONE);
|
2009-04-20 04:58:22 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE);
|
2011-11-11 13:09:14 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_full_sample_get", NULL);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Full Sample",
|
|
|
|
|
"Save for every anti-aliasing sample the entire RenderLayer results "
|
|
|
|
|
"(this solves anti-aliasing issues with compositing)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-03-11 00:24:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
|
2009-07-10 16:55:49 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode");
|
|
|
|
|
RNA_def_property_enum_items(prop, display_mode_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Display", "Select where rendered images will be displayed");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2013-12-26 17:24:42 +06:00
|
|
|
|
Option to lock the interface while rendering
Added function called WM_set_locked_interface which does
two things:
- Prevents event queue from being handled, so no operators
(see below) or values are even possible to run or change.
This prevents any kind of "destructive" action performed
from user while rendering.
- Locks interface refresh for regions which does have lock
set to truth in their template. Currently it's just a 3D
viewport, but in the future more regions could be considered
unsafe, or we could want to lock different parts of
interface when doing different jobs.
This is needed because 3D viewport could be using or changing
the same data as renderer currently uses, leading to threading
conflict.
Notifiers are still allowed to handle, so render progress is
seen on the screen, but would need to doublecheck on this, in
terms some notifiers could be changing the data.
For now interface locking happens for render job only in case
"Lock Interface" checkbox is enabled.
Other tools like backing would also benefit of this option.
It is possible to mark operator as safe to be used in locked
interface mode by adding OPTYPE_ALLOW_LOCKED bit to operator
template flags.
This bit is completely handled by wm_evem_system, not
with operator run routines, so it's still possible to
run operators from drivers and handlers.
Currently allowed image editor navigation and zooming.
Reviewers: brecht, campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D142
2014-01-29 16:07:14 +06:00
|
|
|
prop = RNA_def_property(srna, "use_lock_interface", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "use_lock_interface", 1);
|
2014-01-30 16:24:51 +11:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true);
|
Option to lock the interface while rendering
Added function called WM_set_locked_interface which does
two things:
- Prevents event queue from being handled, so no operators
(see below) or values are even possible to run or change.
This prevents any kind of "destructive" action performed
from user while rendering.
- Locks interface refresh for regions which does have lock
set to truth in their template. Currently it's just a 3D
viewport, but in the future more regions could be considered
unsafe, or we could want to lock different parts of
interface when doing different jobs.
This is needed because 3D viewport could be using or changing
the same data as renderer currently uses, leading to threading
conflict.
Notifiers are still allowed to handle, so render progress is
seen on the screen, but would need to doublecheck on this, in
terms some notifiers could be changing the data.
For now interface locking happens for render job only in case
"Lock Interface" checkbox is enabled.
Other tools like backing would also benefit of this option.
It is possible to mark operator as safe to be used in locked
interface mode by adding OPTYPE_ALLOW_LOCKED bit to operator
template flags.
This bit is completely handled by wm_evem_system, not
with operator run routines, so it's still possible to
run operators from drivers and handlers.
Currently allowed image editor navigation and zooming.
Reviewers: brecht, campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D142
2014-01-29 16:07:14 +06:00
|
|
|
RNA_def_property_ui_text(prop, "Lock Interface", "Lock interface during rendering in favor of giving more memory to the renderer");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
|
UI: Layout Engine
* Buttons are now created first, and after that the layout is computed.
This means the layout engine now works at button level, and makes it
easier to write templates. Otherwise you had to store all info and
create the buttons later.
* Added interface_templates.c as a separate file to put templates in.
These can contain regular buttons, and can be put in a Free layout,
which means you can specify manual coordinates, but still get nested
correct inside other layouts.
* API was changed to allow better nesting. Previously items were added
in the last added layout specifier, i.e. one level up in the layout
hierarchy. This doesn't work well in always, so now when creating things
like rows or columns it always returns a layout which you have to add
the items in. All py scripts were updated to follow this.
* Computing the layout now goes in two passes, first estimating the
required width/height of all nested layouts, and then in the second
pass using the results of that to decide on the actual locations.
* Enum and array buttons now follow the direction of the layout, i.e.
they are vertical or horizontal depending if they are in a column or row.
* Color properties now get a color picker, and only get the additional
RGB sliders with Expand=True.
* File/directory string properties now get a button next to them for
opening the file browse, though this is not implemented yet.
* Layout items can now be aligned, set align=True when creating a column,
row, etc.
* Buttons now get a minimum width of one icon (avoids squashing icon
buttons).
* Moved some more space variables into Style.
2009-05-15 11:19:59 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "pic");
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Output Path",
|
|
|
|
|
"Directory/name to save animations, # characters defines the position "
|
|
|
|
|
"and length of frame numbers");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-07-21 14:11:51 +00:00
|
|
|
|
2014-06-28 19:13:54 +02:00
|
|
|
/* Render result EXR cache. */
|
|
|
|
|
prop = RNA_def_property(srna, "use_render_cache", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_CACHE_FILE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Cache Result",
|
|
|
|
|
"Save render cache to EXR files (useful for heavy compositing, "
|
|
|
|
|
"Note: affects indirectly rendered scenes)");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2009-08-26 15:13:58 +00:00
|
|
|
/* Bake */
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_mode");
|
|
|
|
|
RNA_def_property_enum_items(prop, bake_mode_items);
|
2009-12-31 10:07:59 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Bake Mode", "Choose shading information to bake into the image");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_normal_space");
|
|
|
|
|
RNA_def_property_enum_items(prop, bake_normal_space_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "bake_quad_split", PROP_ENUM, PROP_NONE);
|
2009-12-31 10:07:59 +00:00
|
|
|
RNA_def_property_enum_items(prop, bake_qyad_split_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Quad Split", "Choose the method used to split a quad into 2 triangles for baking");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_osa");
|
2010-03-16 18:22:55 +00:00
|
|
|
RNA_def_property_enum_items(prop, fixed_oversample_items);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Anti-Aliasing Level", "");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_bake_selected_to_active", PROP_BOOLEAN, PROP_NONE);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Selected to Active",
|
|
|
|
|
"Bake shading on the surface of selected objects to the active object");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_bake_normalize", PROP_BOOLEAN, PROP_NONE);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_NORMALIZE);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Normalized",
|
|
|
|
|
"With displacement normalize to the distance, with ambient occlusion "
|
|
|
|
|
"normalize without using material settings");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_bake_antialiasing", PROP_BOOLEAN, PROP_NONE);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_OSA);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2013-12-13 17:03:44 +01:00
|
|
|
prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_PIXEL);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "bake_filter");
|
2011-07-24 10:26:22 +00:00
|
|
|
RNA_def_property_range(prop, 0, 64);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Margin",
|
2013-12-13 17:03:44 +01:00
|
|
|
"Extends the baked result as a post process filter");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-08-26 15:13:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bake_maxdist");
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 1000.0);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Distance",
|
|
|
|
|
"Maximum distance from active object to other object (in blender units)");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
|
2009-08-26 15:13:58 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bake_biasdist");
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 1000.0);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Bias", "Bias towards faces further away from the object (in blender units)");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_bake_multires", PROP_BOOLEAN, PROP_NONE);
|
2011-06-05 20:54:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_MULTIRES);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Bake from Multires", "Bake directly from multires object");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-06-05 20:54:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_bake_lores_mesh", PROP_BOOLEAN, PROP_NONE);
|
2011-06-05 20:54:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_LORES_MESH);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Low Resolution Mesh",
|
|
|
|
|
"Calculate heights against unsubdivided low resolution mesh");
|
2012-05-21 20:28:54 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-06-05 20:54:04 +00:00
|
|
|
|
2012-12-19 12:30:39 +00:00
|
|
|
prop = RNA_def_property(srna, "bake_samples", PROP_INT, PROP_NONE);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "bake_samples");
|
2012-12-18 17:46:42 +00:00
|
|
|
RNA_def_property_range(prop, 64, 1024);
|
|
|
|
|
RNA_def_property_int_default(prop, 256);
|
2012-12-19 12:30:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Samples", "Number of samples used for ambient occlusion baking from multires");
|
2012-12-18 17:46:42 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2013-01-02 01:49:07 +00:00
|
|
|
prop = RNA_def_property(srna, "use_bake_to_vertex_color", PROP_BOOLEAN, PROP_NONE);
|
2013-01-02 00:05:30 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_VCOL);
|
2013-01-02 16:56:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Bake to Vertex Color",
|
2013-01-02 01:36:36 +00:00
|
|
|
"Bake to vertex colors instead of to a UV-mapped image");
|
2013-01-02 00:05:30 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2013-10-09 15:51:14 +00:00
|
|
|
prop = RNA_def_property(srna, "use_bake_user_scale", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_USERSCALE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "User scale", "Use a user scale for the derivative map");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "bake_user_scale", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bake_user_scale");
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 1000.0);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Scale",
|
|
|
|
|
"Instead of automatically normalizing to 0..1, "
|
2013-10-10 17:28:01 +00:00
|
|
|
"apply a user scale to the derivative map");
|
2013-10-09 15:51:14 +00:00
|
|
|
|
2009-07-21 14:11:51 +00:00
|
|
|
/* stamp */
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_time", PROP_BOOLEAN, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stamp Time",
|
|
|
|
|
"Include the rendered frame timecode as HH:MM:SS.FF in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_date", PROP_BOOLEAN, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_frame", PROP_BOOLEAN, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_camera", PROP_BOOLEAN, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the active camera in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2011-01-13 19:16:35 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_lens", PROP_BOOLEAN, PROP_NONE);
|
2011-01-13 19:16:35 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERALENS);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stamp Lens", "Include the active camera's lens in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_scene", PROP_BOOLEAN, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the active scene in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_note", PROP_BOOLEAN, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_marker", PROP_BOOLEAN, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the last marker in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_filename", PROP_BOOLEAN, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stamp Filename", "Include the .blend filename in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_sequencer_strip", PROP_BOOLEAN, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stamp Sequence Strip",
|
|
|
|
|
"Include the name of the foreground sequence strip in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-10-15 19:18:40 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_render_time", PROP_BOOLEAN, PROP_NONE);
|
2009-10-15 19:18:40 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_RENDERTIME);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stamp Render Time", "Include the render time in image metadata");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-10-15 19:18:40 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp", PROP_BOOLEAN, PROP_NONE);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW);
|
2015-07-01 15:23:09 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Stamp Output", "Render the stamp info text in the rendered image");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2015-07-01 15:23:09 +02:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_stamp_strip_meta", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_STRIPMETA);
|
2015-07-14 11:18:27 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Strip Metadata", "Use metadata from the strips in the sequencer");
|
2015-07-01 15:23:09 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "stamp_font_size", PROP_INT, PROP_NONE);
|
2009-10-15 19:18:40 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "stamp_font_id");
|
|
|
|
|
RNA_def_property_range(prop, 8, 64);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Font Size", "Size of the font used when rendering stamp text");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-10-15 19:18:40 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
|
|
|
|
|
RNA_def_property_array(prop, 4);
|
2012-04-29 15:47:02 +00:00
|
|
|
RNA_def_property_range(prop, 0.0, 1.0);
|
2012-01-05 23:49:57 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Text Color", "Color to use for stamp text");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-05-26 05:03:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
|
2009-05-26 05:03:27 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
|
|
|
|
|
RNA_def_property_array(prop, 4);
|
2012-04-29 15:47:02 +00:00
|
|
|
RNA_def_property_range(prop, 0.0, 1.0);
|
2012-01-05 23:49:57 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Background", "Color to use behind stamp text");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-07-21 14:11:51 +00:00
|
|
|
|
2010-03-16 17:37:34 +00:00
|
|
|
/* sequencer draw options */
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_sequencer_gl_preview", PROP_BOOLEAN, PROP_NONE);
|
2010-03-16 17:37:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_PREV);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Sequencer OpenGL", "");
|
2012-11-21 09:36:36 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequencer_update");
|
2010-03-16 17:37:34 +00:00
|
|
|
|
2012-10-24 03:37:32 +00:00
|
|
|
#if 0 /* see R_SEQ_GL_REND comment */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_sequencer_gl_render", PROP_BOOLEAN, PROP_NONE);
|
2010-03-16 17:37:34 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_REND);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Sequencer OpenGL", "");
|
2012-10-24 03:37:32 +00:00
|
|
|
#endif
|
2010-03-16 17:37:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "sequencer_gl_preview", PROP_ENUM, PROP_NONE);
|
2010-03-16 17:37:34 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "seq_prev_type");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_viewport_shade_items);
|
2010-03-16 17:37:34 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view");
|
2012-10-23 12:25:08 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequencer_update");
|
2010-03-16 17:37:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "sequencer_gl_render", PROP_ENUM, PROP_NONE);
|
2010-03-16 17:37:34 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "seq_rend_type");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_viewport_shade_items);
|
2010-03-16 17:37:34 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to draw in the sequencer view");
|
|
|
|
|
|
2012-12-12 12:42:12 +00:00
|
|
|
prop = RNA_def_property(srna, "use_sequencer_gl_textured_solid", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_SOLID_TEX);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Textured Solid", "Draw face-assigned textures in solid draw method");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequencer_update");
|
|
|
|
|
|
2009-07-21 14:11:51 +00:00
|
|
|
/* layers */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "layers", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "SceneRenderLayer");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Render Layers", "");
|
2010-08-24 04:02:50 +00:00
|
|
|
rna_def_render_layers(brna, prop);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2011-09-26 12:08:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NONE);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer");
|
2010-10-12 22:20:10 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
/* views (stereoscopy et al) */
|
|
|
|
|
prop = RNA_def_property(srna, "views", PROP_COLLECTION, PROP_NONE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "SceneRenderView");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Render Views", "");
|
|
|
|
|
rna_def_render_views(brna, prop);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "stereo_views", PROP_COLLECTION, PROP_NONE);
|
|
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "views", NULL);
|
|
|
|
|
RNA_def_property_collection_funcs(prop, "rna_RenderSettings_stereoViews_begin", "rna_iterator_listbase_next",
|
|
|
|
|
"rna_iterator_listbase_end", "rna_iterator_listbase_get",
|
|
|
|
|
NULL, NULL, NULL, NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "SceneRenderView");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Render Views", "");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_MULTIVIEW);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Multiple Views", "Use multiple views in the scene");
|
|
|
|
|
RNA_def_property_update(prop, NC_WINDOW, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_items(prop, views_format_items);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Setup Stereo Mode", "");
|
|
|
|
|
RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_views_format_set", NULL);
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
|
|
|
|
|
2009-07-21 20:28:32 +00:00
|
|
|
/* engine */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
|
2009-07-21 20:28:32 +00:00
|
|
|
RNA_def_property_enum_items(prop, engine_items);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, "rna_RenderSettings_engine_get", "rna_RenderSettings_engine_set",
|
|
|
|
|
"rna_RenderSettings_engine_itemf");
|
2012-09-23 18:50:56 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering");
|
2011-11-02 18:20:53 +00:00
|
|
|
RNA_def_property_update(prop, NC_WINDOW, "rna_RenderSettings_engine_update");
|
2009-07-21 20:28:32 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "has_multiple_engines", PROP_BOOLEAN, PROP_NONE);
|
2010-02-23 12:48:35 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_multiple_engines_get", NULL);
|
2009-07-21 20:28:32 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Multiple Engines", "More than one rendering engine is available");
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_shading_nodes", PROP_BOOLEAN, PROP_NONE);
|
2011-11-02 19:24:30 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_shading_nodes_get", NULL);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Shading Nodes", "Active render engine uses new shading nodes system");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE);
|
2010-02-23 12:48:35 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_game_engine_get", NULL);
|
2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering engine is a game engine");
|
2010-01-08 13:52:38 +00:00
|
|
|
|
2010-01-25 11:39:56 +00:00
|
|
|
/* simplify */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_simplify", PROP_BOOLEAN, PROP_NONE);
|
2010-01-25 11:39:56 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SIMPLIFY);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Simplify", "Enable simplification of scene for quicker preview renders");
|
2010-06-01 17:05:56 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_use_simplify_update");
|
2010-01-25 11:39:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "simplify_subdivision", PROP_INT, PROP_UNSIGNED);
|
2010-01-25 11:39:56 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "simplify_subsurf");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 6, 1, -1);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum subdivision level");
|
2010-01-25 11:39:56 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "simplify_child_particles", PROP_FLOAT, PROP_FACTOR);
|
2010-01-25 11:39:56 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "simplify_particles");
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child particles percentage");
|
2010-01-25 11:39:56 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
|
|
|
|
|
|
2015-05-04 16:26:28 +05:00
|
|
|
prop = RNA_def_property(srna, "simplify_subdivision_render", PROP_INT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "simplify_subsurf_render");
|
|
|
|
|
RNA_def_property_ui_range(prop, 0, 6, 1, -1);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum subdivision level during rendering");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "simplify_child_particles_render", PROP_FLOAT, PROP_FACTOR);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "simplify_particles_render");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child particles percentage during rendering");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "simplify_shadow_samples", PROP_INT, PROP_UNSIGNED);
|
2010-01-25 11:39:56 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "simplify_shadowsamples");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 1, 16, 1, -1);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Simplify Shadow Samples", "Global maximum shadow samples");
|
2010-01-25 11:39:56 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "simplify_ao_sss", PROP_FLOAT, PROP_FACTOR);
|
2010-01-25 11:39:56 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "simplify_aosss");
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Simplify AO and SSS", "Global approximate AO and SSS quality factor");
|
2010-01-25 11:39:56 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_simplify_triangulate", PROP_BOOLEAN, PROP_NONE);
|
2010-02-02 15:51:44 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", R_SIMPLE_NO_TRIANGULATE);
|
2012-01-24 13:17:32 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Skip Quad to Triangles", "Disable non-planar quads being triangulated");
|
2010-02-02 15:51:44 +00:00
|
|
|
|
2012-11-09 23:54:58 +00:00
|
|
|
/* persistent data */
|
|
|
|
|
prop = RNA_def_property(srna, "use_persistent_data", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_PERSISTENT_DATA);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Persistent Data", "Keep render data around for faster re-renders");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Scene_use_persistent_data_update");
|
|
|
|
|
|
2012-04-10 23:53:46 +00:00
|
|
|
/* Freestyle line thickness options */
|
|
|
|
|
prop = RNA_def_property(srna, "line_thickness_mode", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "line_thickness_mode");
|
|
|
|
|
RNA_def_property_enum_items(prop, freestyle_thickness_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Line Thickness Mode", "Line thickness mode for Freestyle line drawing");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2012-04-10 23:53:46 +00:00
|
|
|
|
2013-12-13 17:03:44 +01:00
|
|
|
prop = RNA_def_property(srna, "line_thickness", PROP_FLOAT, PROP_PIXEL);
|
2012-04-10 23:53:46 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "unit_line_thickness");
|
|
|
|
|
RNA_def_property_range(prop, 0.f, 10000.f);
|
2013-04-07 10:23:48 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Line Thickness", "Line thickness in pixels");
|
2014-06-06 00:56:04 +09:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
|
2012-04-10 23:53:46 +00:00
|
|
|
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
/* Bake Settings */
|
|
|
|
|
prop = RNA_def_property(srna, "bake", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "bake");
|
|
|
|
|
RNA_def_property_struct_type(prop, "BakeSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Bake Data", "");
|
|
|
|
|
|
2015-06-11 11:27:39 +02:00
|
|
|
/* Debugging settings. */
|
|
|
|
|
#ifdef WITH_CYCLES_DEBUG
|
|
|
|
|
prop = RNA_def_property(srna, "debug_pass_type", PROP_ENUM, PROP_NONE);
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_render_pass_debug_type_items);
|
2015-06-11 11:27:39 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Debug Pass Type", "Type of the debug pass to use");
|
2015-07-24 18:41:54 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2015-06-11 11:27:39 +02:00
|
|
|
#endif
|
|
|
|
|
|
Bake API - bpy.ops.object.bake()
New operator that can calls a bake function to the current render engine when available. This commit provides no feature for the users, but allows external engines to be accessed by the operator and be integrated with the baking api.
The API itself is simple. Blender sends a populated array of BakePixels to the renderer, and gets back an array of floats with the result.
The Blender Internal (and multires) system is still running independent, but we eventually will pipe it through the API as well. Cycles baking will come next as a separated commit
Python Operator:
----------------
The operator can be called with some arguments, or a user interface can be created for it. In that case the arguments can be ommited and the interface can expose the settings from bpy.context.scene.render.bake
bpy.ops.object.bake(type='COMBINED', filepath="", width=512, height=512, margin=16, use_selected_to_active=False, cage_extrusion=0, cage="", normal_space='TANGENT', normal_r='POS_X', normal_g='POS_Y', normal_b='POS_Z', save_mode='INTERNAL', use_clear=False, use_split_materials=False, use_automatic_name=False)
Note: external save mode is currently disabled.
Supported Features:
------------------
* Margin - Baked result is extended this many pixels beyond the border of each UV "island," to soften seams in the texture.
* Selected to Active - bake shading on the surface of selected object to the active object. The rays are cast from the lowpoly object inwards towards the highpoly object. If the highpoly object is not entirely involved by the lowpoly object, you can tweak the rays start point with Cage Extrusion. For even more control of the cage you can use a Cage object.
* Cage Extrusion - distance to use for the inward ray cast when using selected to active
* Custom Cage - object to use as cage (instead of the lowpoly object).
* Normal swizzle - change the axis that gets mapped to RGB
* Normal space - save as tangent or object normal spaces
Supported Passes:
-----------------
Any pass that is supported by Blender renderlayer system. Though it's up to the external engine to provide a valid enum with its supported passes. Normal passes get a special treatment since we post-process them to converted and "swizzled"
Development Notes for External Engines:
---------------------------------------
(read them in bake_api.c)
* For a complete implementation example look at the Cycles Bake commit (next).
Review: D421
Reviewed by: Campbell Barton, Brecht van Lommel, Sergey Sharybin, Thomas Dinge
Normal map pipeline "consulting" by Andy Davies (metalliandy)
Original design by Brecht van Lommel.
The entire commit history can be found on the branch: bake-cycles
2014-01-02 19:05:07 -02:00
|
|
|
/* Nestled Data */
|
|
|
|
|
/* *** Non-Animated *** */
|
|
|
|
|
RNA_define_animate_sdna(false);
|
|
|
|
|
rna_def_bake_data(brna);
|
|
|
|
|
RNA_define_animate_sdna(true);
|
|
|
|
|
|
|
|
|
|
/* *** Animated *** */
|
|
|
|
|
|
2010-01-08 13:52:38 +00:00
|
|
|
/* Scene API */
|
|
|
|
|
RNA_api_scene_render(srna);
|
2009-02-20 06:05:00 +00:00
|
|
|
}
|
|
|
|
|
|
2009-11-13 16:08:03 +00:00
|
|
|
/* scene.objects */
|
|
|
|
|
static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2009-11-20 10:00:54 +00:00
|
|
|
FunctionRNA *func;
|
|
|
|
|
PropertyRNA *parm;
|
2009-11-16 11:11:16 +00:00
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "SceneObjects");
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "SceneObjects", NULL);
|
2009-11-20 10:00:54 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Scene");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Scene Objects", "Collection of scene objects");
|
2009-11-13 16:08:03 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
func = RNA_def_function(srna, "link", "rna_Scene_object_link");
|
2011-09-19 13:23:58 +00:00
|
|
|
RNA_def_function_ui_description(func, "Link object to scene, run scene.update() after");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
|
2012-03-05 23:30:41 +00:00
|
|
|
parm = RNA_def_pointer(func, "object", "Object", "", "Object to add to scene");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
|
2012-03-05 23:30:41 +00:00
|
|
|
parm = RNA_def_pointer(func, "base", "ObjectBase", "", "The newly created base");
|
2010-02-10 16:10:47 +00:00
|
|
|
RNA_def_function_return(func, parm);
|
2009-11-13 16:08:03 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
func = RNA_def_function(srna, "unlink", "rna_Scene_object_unlink");
|
2011-09-19 13:23:58 +00:00
|
|
|
RNA_def_function_ui_description(func, "Unlink object from scene");
|
2010-04-06 01:28:39 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
2012-03-05 23:30:41 +00:00
|
|
|
parm = RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
|
2009-11-13 16:08:03 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
|
2009-11-13 16:08:03 +00:00
|
|
|
RNA_def_property_struct_type(prop, "Object");
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_object_get", "rna_Scene_active_object_set", NULL, NULL);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Object", "Active object for this scene");
|
2009-11-13 16:08:03 +00:00
|
|
|
/* Could call: ED_base_object_activate(C, scene->basact);
|
|
|
|
|
* but would be a bad level call and it seems the notifier is enough */
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, NULL);
|
2009-11-13 16:08:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-11-13 16:37:44 +00:00
|
|
|
/* scene.bases.* */
|
|
|
|
|
static void rna_def_scene_bases(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
/* FunctionRNA *func; */
|
|
|
|
|
/* PropertyRNA *parm; */
|
2009-11-13 16:37:44 +00:00
|
|
|
|
2009-11-16 11:11:16 +00:00
|
|
|
RNA_def_property_srna(cprop, "SceneBases");
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "SceneBases", NULL);
|
2009-11-13 16:37:44 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Scene");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Scene Bases", "Collection of scene bases");
|
2009-11-13 16:37:44 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
|
2009-11-13 16:37:44 +00:00
|
|
|
RNA_def_property_struct_type(prop, "ObjectBase");
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "basact");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Base", "Active object base in the scene");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, NULL);
|
2009-11-13 16:37:44 +00:00
|
|
|
}
|
|
|
|
|
|
2010-04-01 12:10:21 +00:00
|
|
|
/* scene.timeline_markers */
|
|
|
|
|
static void rna_def_timeline_markers(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
|
|
|
|
|
FunctionRNA *func;
|
|
|
|
|
PropertyRNA *parm;
|
|
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "TimelineMarkers");
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "TimelineMarkers", NULL);
|
2010-04-01 12:10:21 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Scene");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Timeline Markers", "Collection of timeline markers");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
func = RNA_def_function(srna, "new", "rna_TimeLine_add");
|
2011-09-19 13:23:58 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add a keyframe to the curve");
|
2012-03-05 23:30:41 +00:00
|
|
|
parm = RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)");
|
2010-04-01 12:10:21 +00:00
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
2013-12-13 12:36:40 -02:00
|
|
|
parm = RNA_def_int(func, "frame", 1, -MAXFRAME, MAXFRAME, "", "The frame for the new marker", -MAXFRAME, MAXFRAME);
|
2012-03-05 23:30:41 +00:00
|
|
|
parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created timeline marker");
|
2010-04-01 12:10:21 +00:00
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
func = RNA_def_function(srna, "remove", "rna_TimeLine_remove");
|
2011-09-19 13:23:58 +00:00
|
|
|
RNA_def_function_ui_description(func, "Remove a timeline marker");
|
2010-04-01 12:10:21 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
2012-03-05 23:30:41 +00:00
|
|
|
parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove");
|
2012-11-02 09:41:26 +00:00
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
|
|
|
|
|
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
|
2011-11-23 16:12:11 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
func = RNA_def_function(srna, "clear", "rna_TimeLine_clear");
|
2011-11-23 16:12:11 +00:00
|
|
|
RNA_def_function_ui_description(func, "Remove all timeline markers");
|
2010-04-01 12:10:21 +00:00
|
|
|
}
|
|
|
|
|
|
2010-08-23 22:16:45 +00:00
|
|
|
/* scene.keying_sets */
|
|
|
|
|
static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2010-08-30 14:33:46 +00:00
|
|
|
FunctionRNA *func;
|
|
|
|
|
PropertyRNA *parm;
|
2010-08-23 22:16:45 +00:00
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "KeyingSets");
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "KeyingSets", NULL);
|
2010-08-23 22:16:45 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Scene");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Keying Sets", "Scene keying sets");
|
|
|
|
|
|
2010-08-30 14:33:46 +00:00
|
|
|
/* Add Keying Set */
|
2012-03-05 23:30:41 +00:00
|
|
|
func = RNA_def_function(srna, "new", "rna_Scene_keying_set_new");
|
2011-09-19 13:23:58 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add a new Keying Set to Scene");
|
2010-08-23 22:16:45 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
2010-09-23 08:15:53 +00:00
|
|
|
/* name */
|
2012-03-08 14:04:06 +00:00
|
|
|
RNA_def_string(func, "idname", "KeyingSet", 64, "IDName", "Internal identifier of Keying Set");
|
|
|
|
|
RNA_def_string(func, "name", "KeyingSet", 64, "Name", "User visible name of Keying Set");
|
2010-09-23 08:15:53 +00:00
|
|
|
|
2010-08-30 14:33:46 +00:00
|
|
|
/* returns the new KeyingSet */
|
2012-03-05 23:30:41 +00:00
|
|
|
parm = RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set");
|
2010-08-30 14:33:46 +00:00
|
|
|
RNA_def_function_return(func, parm);
|
2010-09-23 08:15:53 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
|
2010-08-23 22:16:45 +00:00
|
|
|
RNA_def_property_struct_type(prop, "KeyingSet");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get",
|
|
|
|
|
"rna_Scene_active_keying_set_set", NULL, NULL);
|
2010-08-23 22:16:45 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
|
2010-08-24 06:52:16 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
|
2010-08-24 06:52:16 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get",
|
|
|
|
|
"rna_Scene_active_keying_set_index_set", NULL);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Keying Set Index",
|
|
|
|
|
"Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
|
2010-08-24 06:52:16 +00:00
|
|
|
}
|
2010-08-24 04:02:50 +00:00
|
|
|
|
2010-08-24 06:52:16 +00:00
|
|
|
static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "KeyingSetsAll");
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "KeyingSetsAll", NULL);
|
2010-08-24 06:52:16 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Scene");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Keying Sets All", "All available keying sets");
|
|
|
|
|
|
|
|
|
|
/* NOTE: no add/remove available here, without screwing up this amalgamated list... */
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
|
2010-08-24 06:52:16 +00:00
|
|
|
RNA_def_property_struct_type(prop, "KeyingSet");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get",
|
|
|
|
|
"rna_Scene_active_keying_set_set", NULL, NULL);
|
2010-08-24 06:52:16 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
|
2010-08-24 06:52:16 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
|
2010-08-24 04:02:50 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get",
|
|
|
|
|
"rna_Scene_active_keying_set_index_set", NULL);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Keying Set Index",
|
|
|
|
|
"Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
|
2010-08-23 22:16:45 +00:00
|
|
|
}
|
|
|
|
|
|
2012-01-17 16:31:13 +00:00
|
|
|
/* Runtime property, used to remember uv indices, used only in UV stitch for now.
|
|
|
|
|
*/
|
|
|
|
|
static void rna_def_selected_uv_element(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "SelectedUvElement", "PropertyGroup");
|
2012-01-23 22:57:46 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Selected UV Element", "");
|
2012-01-17 16:31:13 +00:00
|
|
|
|
|
|
|
|
/* store the index to the UV element selected */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "element_index", PROP_INT, PROP_UNSIGNED);
|
2012-01-17 16:31:13 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_IDPROPERTY);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Element Index", "");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "face_index", PROP_INT, PROP_UNSIGNED);
|
2012-01-17 16:31:13 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_IDPROPERTY);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Face Index", "");
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-19 16:30:35 +11:00
|
|
|
static void rna_def_display_safe_areas(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static float default_title[2] = {0.035f, 0.035f};
|
|
|
|
|
static float default_action[2] = {0.1f, 0.05f};
|
|
|
|
|
|
|
|
|
|
static float default_title_center[2] = {0.175f, 0.05f};
|
|
|
|
|
static float default_action_center[2] = {0.15f, 0.05f};
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "DisplaySafeAreas", NULL);
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Safe Areas", "Safe Areas used in 3D view and the VSE");
|
|
|
|
|
RNA_def_struct_sdna(srna, "DisplaySafeAreas");
|
|
|
|
|
|
|
|
|
|
/* SAFE AREAS */
|
|
|
|
|
prop = RNA_def_property(srna, "title", PROP_FLOAT, PROP_XYZ);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "title");
|
|
|
|
|
RNA_def_property_array(prop, 2);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_float_array_default(prop, default_title);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Title Safe margins", "Safe area for text and graphics");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_DRAW_RENDER_VIEWPORT, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "action", PROP_FLOAT, PROP_XYZ);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "action");
|
|
|
|
|
RNA_def_property_array(prop, 2);
|
|
|
|
|
RNA_def_property_float_array_default(prop, default_action);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Action Safe Margins", "Safe area for general elements");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_DRAW_RENDER_VIEWPORT, NULL);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "title_center", PROP_FLOAT, PROP_XYZ);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "title_center");
|
|
|
|
|
RNA_def_property_array(prop, 2);
|
|
|
|
|
RNA_def_property_float_array_default(prop, default_title_center);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Center Title Safe Margins", "Safe area for text and graphics in a different aspect ratio");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_DRAW_RENDER_VIEWPORT, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "action_center", PROP_FLOAT, PROP_XYZ);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "action_center");
|
|
|
|
|
RNA_def_property_array(prop, 2);
|
|
|
|
|
RNA_def_property_float_array_default(prop, default_action_center);
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Center Action Safe Margins", "Safe area for general elements in a different aspect ratio");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_DRAW_RENDER_VIEWPORT, NULL);
|
|
|
|
|
}
|
2012-01-17 16:31:13 +00:00
|
|
|
|
|
|
|
|
|
2008-10-31 23:50:02 +00:00
|
|
|
void RNA_def_scene(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
2012-05-11 10:04:55 +00:00
|
|
|
|
2009-08-19 12:35:40 +00:00
|
|
|
FunctionRNA *func;
|
2012-05-11 10:04:55 +00:00
|
|
|
PropertyRNA *parm;
|
2009-07-24 11:24:00 +00:00
|
|
|
|
2009-09-20 17:55:03 +00:00
|
|
|
static EnumPropertyItem audio_distance_model_items[] = {
|
2010-02-11 01:11:52 +00:00
|
|
|
{0, "NONE", 0, "None", "No distance attenuation"},
|
|
|
|
|
{1, "INVERSE", 0, "Inverse", "Inverse distance model"},
|
|
|
|
|
{2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance model with clamping"},
|
|
|
|
|
{3, "LINEAR", 0, "Linear", "Linear distance model"},
|
|
|
|
|
{4, "LINEAR_CLAMPED", 0, "Linear Clamped", "Linear distance model with clamping"},
|
|
|
|
|
{5, "EXPONENT", 0, "Exponent", "Exponent distance model"},
|
|
|
|
|
{6, "EXPONENT_CLAMPED", 0, "Exponent Clamped", "Exponent distance model with clamping"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2009-09-20 17:55:03 +00:00
|
|
|
|
2010-02-19 12:20:29 +00:00
|
|
|
static EnumPropertyItem sync_mode_items[] = {
|
|
|
|
|
{0, "NONE", 0, "No Sync", "Do not sync, play every frame"},
|
|
|
|
|
{SCE_FRAME_DROP, "FRAME_DROP", 0, "Frame Dropping", "Drop frames if playback is too slow"},
|
|
|
|
|
{AUDIO_SYNC, "AUDIO_SYNC", 0, "AV-sync", "Sync to audio playback, dropping frames"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2010-02-19 12:20:29 +00:00
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
/* Struct definition */
|
2012-03-05 23:30:41 +00:00
|
|
|
srna = RNA_def_struct(brna, "Scene", "ID");
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Scene",
|
|
|
|
|
"Scene data block, consisting in objects and defining time and render related settings");
|
2009-06-03 23:16:51 +00:00
|
|
|
RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA);
|
2009-05-29 15:12:31 +00:00
|
|
|
RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT);
|
2009-07-24 11:24:00 +00:00
|
|
|
|
|
|
|
|
/* Global Settings */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
|
2009-03-30 17:31:37 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-08-03 06:51:36 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Camera", "Active camera, used for rendering the scene");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_view3d_update");
|
2009-04-27 18:05:58 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "background_set", PROP_POINTER, PROP_NONE);
|
2009-10-14 13:20:20 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "set");
|
|
|
|
|
RNA_def_property_struct_type(prop, "Scene");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
|
2010-08-03 05:14:59 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL, NULL);
|
2010-03-18 04:46:27 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Background Scene", "Background set scene");
|
2012-05-23 09:46:33 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_update");
|
2009-10-14 13:20:20 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
|
2009-04-27 18:05:58 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "World", "World used for rendering the scene");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_WORLD, "rna_Scene_glsl_update");
|
2008-10-31 23:50:02 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
|
2009-01-01 20:44:40 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "cursor");
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location");
|
2008-10-31 23:50:02 +00:00
|
|
|
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
|
2009-07-26 08:53:23 +00:00
|
|
|
RNA_def_property_update(prop, NC_WINDOW, NULL);
|
2009-07-24 11:24:00 +00:00
|
|
|
|
|
|
|
|
/* Bases/Objects */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "object_bases", PROP_COLLECTION, PROP_NONE);
|
2009-11-02 11:14:22 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
|
2009-11-11 09:16:53 +00:00
|
|
|
RNA_def_property_struct_type(prop, "ObjectBase");
|
2009-11-02 11:14:22 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Bases", "");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL,
|
|
|
|
|
"rna_Scene_object_bases_lookup_string", NULL);
|
2009-11-13 16:37:44 +00:00
|
|
|
rna_def_scene_bases(brna, prop);
|
2009-11-03 16:07:29 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
|
2008-11-07 02:58:25 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
|
2008-10-31 23:50:02 +00:00
|
|
|
RNA_def_property_struct_type(prop, "Object");
|
2008-11-29 14:35:50 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Objects", "");
|
2011-10-01 15:40:32 +00:00
|
|
|
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_Scene_objects_get", NULL, NULL, NULL, NULL);
|
2009-11-13 16:08:03 +00:00
|
|
|
rna_def_scene_objects(brna, prop);
|
2009-11-03 16:07:29 +00:00
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
/* Layers */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER);
|
2012-05-10 15:22:29 +00:00
|
|
|
/* this seems to be too much trouble with depsgraph updates/etc. currently (20110420) */
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2008-10-31 23:50:02 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
|
|
|
|
|
RNA_def_property_array(prop, 20);
|
2008-11-14 11:15:53 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set");
|
2014-12-10 17:00:54 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Layers", "Visible layers - Shift-Click/Drag to select multiple layers");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_LAYER, "rna_Scene_layer_update");
|
2012-03-08 18:50:42 +00:00
|
|
|
|
|
|
|
|
/* active layer */
|
|
|
|
|
prop = RNA_def_property(srna, "active_layer", PROP_INT, PROP_NONE);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
|
2012-03-08 18:50:42 +00:00
|
|
|
RNA_def_property_int_funcs(prop, "rna_Scene_active_layer_get", NULL, NULL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Active Layer", "Active scene layer index");
|
|
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
/* Frame Range Stuff */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_current", PROP_INT, PROP_TIME);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2008-10-31 23:50:02 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "r.cfra");
|
2009-07-07 06:56:29 +00:00
|
|
|
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
|
2012-09-23 18:50:56 +00:00
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_frame_current_set", NULL);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Current Frame",
|
|
|
|
|
"Current Frame, to update animation data from python frame_set() instead");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_frame_update");
|
2008-11-26 23:13:59 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME);
|
2011-05-12 22:52:30 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "r.subframe");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Current Sub-Frame", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
|
2011-05-12 22:52:30 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2008-11-26 23:13:59 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "r.sfra");
|
|
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
|
2009-10-11 07:29:53 +00:00
|
|
|
RNA_def_property_range(prop, MINFRAME, MAXFRAME);
|
2010-02-10 18:47:55 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Start Frame", "First frame of the playback/rendering range");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME_RANGE, NULL);
|
2008-11-26 23:13:59 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2008-11-26 23:13:59 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "r.efra");
|
|
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
|
2009-10-11 07:29:53 +00:00
|
|
|
RNA_def_property_range(prop, MINFRAME, MAXFRAME);
|
2010-02-10 18:47:55 +00:00
|
|
|
RNA_def_property_ui_text(prop, "End Frame", "Final frame of the playback/rendering range");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME_RANGE, NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-11-10 04:56:55 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "r.frame_step");
|
- add torus back from 2.4x as an operator
bpy.ops.mesh.primitive_torus_add(major_radius=1, minor_radius=0.25, major_segments=48, minor_segments=16)
- experemental dynamic menus, used for INFO_MT_file, INFO_MT_file_import, INFO_MT_file_export and INFO_MT_mesh_add. these can have items added from python.
eg.
- removed OBJECT_OT_mesh_add, use the python add menu instead.
- made mesh primitive ops - MESH_OT_primitive_plane_add, ...cube_add, etc. work in object mode.
- RNA scene.active_object wrapped
- bugfix [#19466] 2.5: Tweak menu only available for mesh objects added within Edit Mode
ED_object_exit_editmode was always doing an undo push, made this optional using the existing flag - EM_DO_UNDO, called everywhere except when adding primitives.
2009-10-10 21:23:20 +00:00
|
|
|
RNA_def_property_range(prop, 0, MAXFRAME);
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 1, 100, 1, -1);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Frame Step",
|
|
|
|
|
"Number of frames to skip forward while rendering/playing back each frame");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
|
2009-07-24 11:24:00 +00:00
|
|
|
|
2013-07-19 10:41:09 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_current_final", PROP_FLOAT, PROP_TIME);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
|
|
|
|
|
RNA_def_property_float_funcs(prop, "rna_Scene_frame_current_final_get", NULL, NULL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Current Frame Final",
|
|
|
|
|
"Current frame with subframe and time remapping applied");
|
|
|
|
|
|
2013-10-13 20:46:02 +00:00
|
|
|
prop = RNA_def_property(srna, "lock_frame_selection_to_range", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_LOCK_FRAME_SELECTION);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Lock Frame Selection",
|
|
|
|
|
"Don't allow frame to be selected with mouse outside of frame range");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
|
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_LOCKED, 0);
|
|
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
/* Preview Range (frame-range for UI playback) */
|
2012-03-18 09:27:36 +00:00
|
|
|
prop = RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2010-01-19 20:30:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_PRV_RANGE);
|
|
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_preview_range_set");
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Preview Range",
|
2013-12-30 23:50:19 +01:00
|
|
|
"Use an alternative start/end frame range for animation playback and "
|
|
|
|
|
"OpenGL renders instead of the Render properties start/end frame range");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
|
2010-05-03 03:33:20 +00:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_PREVIEW_RANGE, 0);
|
2009-07-24 11:24:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_preview_start", PROP_INT, PROP_TIME);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-07-24 11:24:00 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "r.psfra");
|
|
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL);
|
2010-05-03 03:33:20 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Preview Range Start Frame", "Alternative start frame for UI playback");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
|
2009-07-24 11:24:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_preview_end", PROP_INT, PROP_TIME);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-07-24 11:24:00 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "r.pefra");
|
|
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL);
|
2010-05-03 03:33:20 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Preview Range End Frame", "Alternative end frame for UI playback");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
|
2009-07-24 11:24:00 +00:00
|
|
|
|
2014-04-26 03:36:34 +12:00
|
|
|
/* Timeline / Time Navigation settings */
|
|
|
|
|
prop = RNA_def_property(srna, "show_keys_from_selected_only", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SCE_KEYS_NO_SELONLY);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Only Keyframes from Selected Channels",
|
|
|
|
|
"Consider keyframes for active Object and/or its selected bones only "
|
|
|
|
|
"(in timeline and when jumping between keyframes)");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL);
|
|
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
/* Stamp */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_stamp_note", PROP_STRING, PROP_NONE);
|
2008-10-31 23:50:02 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stamp Note", "User defined note for the render stamping");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
|
2009-07-24 11:24:00 +00:00
|
|
|
|
2009-09-27 09:38:13 +00:00
|
|
|
/* Animation Data (for Scene) */
|
|
|
|
|
rna_def_animdata_common(srna);
|
|
|
|
|
|
2009-12-08 06:32:30 +00:00
|
|
|
/* Readonly Properties */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "is_nla_tweakmode", PROP_BOOLEAN, PROP_NONE);
|
2009-12-08 06:32:30 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_NLA_EDIT_ON);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* DO NOT MAKE THIS EDITABLE, OR NLA EDITOR BREAKS */
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "NLA TweakMode",
|
|
|
|
|
"Whether there is any action referenced by NLA being edited (strictly read-only)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
|
2009-12-08 06:32:30 +00:00
|
|
|
|
2010-02-19 12:20:29 +00:00
|
|
|
/* Frame dropping flag for playback and sync enum */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_frame_drop", PROP_BOOLEAN, PROP_NONE);
|
2010-02-19 12:20:29 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_FRAME_DROP);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Frame Dropping", "Play back dropping frames if frame display is too slow");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "sync_mode", PROP_ENUM, PROP_NONE);
|
2010-02-19 12:20:29 +00:00
|
|
|
RNA_def_property_enum_funcs(prop, "rna_Scene_sync_mode_get", "rna_Scene_sync_mode_set", NULL);
|
|
|
|
|
RNA_def_property_enum_items(prop, sync_mode_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Sync Mode", "How to sync playback");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
|
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
/* Nodes (Compositing) */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
|
2010-09-22 08:10:46 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree");
|
2009-08-19 00:55:30 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
|
2009-08-19 00:55:30 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
|
2013-03-18 16:34:57 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree");
|
2013-03-18 16:34:57 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_use_nodes_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
/* Sequencer */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "ed");
|
|
|
|
|
RNA_def_property_struct_type(prop, "SequenceEditor");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Sequence Editor", "");
|
2009-02-13 01:51:33 +00:00
|
|
|
|
2012-05-11 10:04:55 +00:00
|
|
|
func = RNA_def_function(srna, "sequence_editor_create", "BKE_sequencer_editing_ensure");
|
|
|
|
|
RNA_def_function_ui_description(func, "Ensure sequence editor is valid in this scene");
|
|
|
|
|
parm = RNA_def_pointer(func, "sequence_editor", "SequenceEditor", "", "New sequence editor data or NULL");
|
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "sequence_editor_clear", "BKE_sequencer_editing_free");
|
|
|
|
|
RNA_def_function_ui_description(func, "Clear sequence editor in this scene");
|
|
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
/* Keying Sets */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
|
2009-02-13 01:51:33 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "KeyingSet");
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Absolute Keying Sets", "Absolute Keying Sets for this Scene");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
|
2010-08-23 22:16:45 +00:00
|
|
|
rna_def_scene_keying_sets(brna, prop);
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin", "rna_Scene_all_keyingsets_next",
|
|
|
|
|
"rna_iterator_listbase_end", "rna_iterator_listbase_get",
|
|
|
|
|
NULL, NULL, NULL, NULL);
|
Keying Sets: BuiltIn vs Absolute Tweaks
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
2010-03-23 11:59:34 +00:00
|
|
|
RNA_def_property_struct_type(prop, "KeyingSet");
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "All Keying Sets",
|
|
|
|
|
"All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL);
|
2010-08-24 06:52:16 +00:00
|
|
|
rna_def_scene_keying_sets_all(brna, prop);
|
2009-07-24 11:24:00 +00:00
|
|
|
|
2013-01-23 05:56:22 +00:00
|
|
|
/* Rigid Body Simulation */
|
|
|
|
|
prop = RNA_def_property(srna, "rigidbody_world", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "rigidbody_world");
|
|
|
|
|
RNA_def_property_struct_type(prop, "RigidBodyWorld");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Rigid Body World", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
/* Tool Settings */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
|
2009-09-16 18:04:01 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
2009-01-17 16:58:05 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "toolsettings");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ToolSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Tool Settings", "");
|
2009-08-13 07:37:41 +00:00
|
|
|
|
|
|
|
|
/* Unit Settings */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NONE);
|
2009-09-16 18:04:01 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
2009-08-13 07:37:41 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "unit");
|
|
|
|
|
RNA_def_property_struct_type(prop, "UnitSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings");
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
|
|
|
|
|
/* Physics Settings */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "physics_settings.gravity");
|
|
|
|
|
RNA_def_property_array(prop, 3);
|
2014-07-24 19:18:00 +06:00
|
|
|
RNA_def_property_ui_range(prop, -200.0f, 200.0f, 1, 2);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in a given direction");
|
|
|
|
|
RNA_def_property_update(prop, 0, "rna_Physics_update");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_NONE);
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "physics_settings.flag", PHYS_GLOBAL_GRAVITY);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Global Gravity", "Use global gravity for all dynamics");
|
Unified effector functionality for particles, cloth and softbody
* Unified scene wide gravity (currently in scene buttons)
instead of each simulation having it's own gravity.
* Weight parameters for all effectors and an effector group
setting.
* Every effector can use noise.
* Most effectors have "shapes" point, plane, surface, every point.
- "Point" is most like the old effectors and uses the
effector location as the effector point.
- "Plane" uses the closest point on effectors local xy-plane
as the effector point.
- "Surface" uses the closest point on an effector object's
surface as the effector point.
- "Every Point" uses every point in a mesh effector object
as an effector point.
- The falloff is calculated from this point, so for example
with "surface" shape and "use only negative z axis" it's
possible to apply force only "inside" the effector object.
* Spherical effector is now renamed as "force" as it's no longer
just spherical.
* New effector parameter "flow", which makes the effector act as
surrounding air velocity, so the resulting force is
proportional to the velocity difference of the point and "air
velocity". For example a wind field with flow=1.0 results in
proper non-accelerating wind.
* New effector fields "turbulence", which creates nice random
flow paths, and "drag", which slows the points down.
* Much improved vortex field.
* Effectors can now effect particle rotation as well as location.
* Use full, or only positive/negative z-axis to apply force
(note. the z-axis is the surface normal in the case of
effector shape "surface")
* New "force field" submenu in add menu, which adds an empty
with the chosen effector (curve object for corve guides).
* Other dynamics should be quite easy to add to the effector
system too if wanted.
* "Unified" doesn't mean that force fields give the exact same results for
particles, softbody & cloth, since their final effect depends on many external
factors, like for example the surface area of the effected faces.
Code changes
* Subversion bump for correct handling of global gravity.
* Separate ui py file for common dynamics stuff.
* Particle settings updating is flushed with it's id through
DAG_id_flush_update(..).
Known issues
* Curve guides don't yet have all ui buttons in place, but they
should work none the less.
* Hair dynamics don't yet respect force fields.
Other changes
* Particle emission defaults now to frames 1-200 with life of 50
frames to fill the whole default timeline.
* Many particles drawing related crashes fixed.
* Sometimes particles didn't update on first frame properly.
* Hair with object/group visualization didn't work properly.
* Memory leaks with PointCacheID lists (Genscher, remember to
free pidlists after use :).
2009-09-30 22:10:14 +00:00
|
|
|
RNA_def_property_update(prop, 0, "rna_Physics_update");
|
2009-07-24 11:24:00 +00:00
|
|
|
|
|
|
|
|
/* Render Data */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "render", PROP_POINTER, PROP_NONE);
|
2009-09-16 18:04:01 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "r");
|
2010-02-23 12:48:35 +00:00
|
|
|
RNA_def_property_struct_type(prop, "RenderSettings");
|
2009-02-20 06:05:00 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Render Data", "");
|
2009-07-24 11:24:00 +00:00
|
|
|
|
2015-01-19 16:30:35 +11:00
|
|
|
/* Safe Areas */
|
|
|
|
|
prop = RNA_def_property(srna, "safe_areas", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "safe_areas");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "DisplaySafeAreas");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Safe Areas", "");
|
|
|
|
|
|
2009-07-24 11:24:00 +00:00
|
|
|
/* Markers */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE);
|
2009-02-24 03:06:23 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "TimelineMarker");
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene");
|
2010-04-01 12:10:21 +00:00
|
|
|
rna_def_timeline_markers(brna, prop);
|
2009-02-24 03:06:23 +00:00
|
|
|
|
2009-09-20 14:00:00 +00:00
|
|
|
/* Audio Settings */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_audio", PROP_BOOLEAN, PROP_NONE);
|
2011-04-10 22:40:37 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, "rna_Scene_use_audio_get", "rna_Scene_use_audio_set");
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted");
|
2009-09-20 14:00:00 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_audio_sync", PROP_BOOLEAN, PROP_NONE);
|
2009-09-20 14:00:00 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
|
2011-09-26 12:08:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Audio Sync",
|
|
|
|
|
"Play back and sync with audio clock, dropping frames if frame display is too slow");
|
2009-09-20 14:00:00 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_audio_scrub", PROP_BOOLEAN, PROP_NONE);
|
2009-09-20 14:00:00 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Audio Scrubbing", "Play audio from Sequence Editor while scrubbing");
|
2009-09-20 17:55:03 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "audio_doppler_speed", PROP_FLOAT, PROP_NONE);
|
2009-09-20 17:55:03 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound");
|
2011-08-03 09:25:40 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-09-26 20:03:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.01f, FLT_MAX);
|
2010-05-04 05:15:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for Doppler effect calculation");
|
2011-08-03 09:25:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update");
|
2009-09-20 17:55:03 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "audio_doppler_factor", PROP_FLOAT, PROP_NONE);
|
2009-09-20 17:55:03 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor");
|
2011-08-03 09:25:40 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-09-26 20:03:01 +00:00
|
|
|
RNA_def_property_range(prop, 0.0, FLT_MAX);
|
2010-05-04 05:15:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for Doppler effect calculation");
|
2011-08-03 09:25:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update");
|
2009-09-20 17:55:03 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "audio_distance_model", PROP_ENUM, PROP_NONE);
|
2009-09-20 17:55:03 +00:00
|
|
|
RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model");
|
2011-08-03 09:25:40 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2009-09-20 17:55:03 +00:00
|
|
|
RNA_def_property_enum_items(prop, audio_distance_model_items);
|
2010-02-10 18:29:58 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Distance Model", "Distance model for distance attenuation calculation");
|
2011-08-03 09:25:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update");
|
2009-09-20 14:00:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "audio.volume");
|
2015-02-21 00:08:27 +11:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100.0f);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Volume", "Audio volume");
|
2015-08-16 17:32:01 +10:00
|
|
|
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND);
|
2009-09-20 14:00:00 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE, NULL);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
RNA_def_property_float_funcs(prop, NULL, "rna_Scene_volume_set", NULL);
|
2009-09-20 14:00:00 +00:00
|
|
|
|
2009-07-20 20:28:29 +00:00
|
|
|
/* Game Settings */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "game_settings", PROP_POINTER, PROP_NONE);
|
2009-09-16 18:04:01 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
2009-07-20 20:28:29 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "gm");
|
|
|
|
|
RNA_def_property_struct_type(prop, "SceneGameData");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Game Data", "");
|
2009-08-19 12:35:40 +00:00
|
|
|
|
|
|
|
|
/* Statistics */
|
2012-03-05 23:30:41 +00:00
|
|
|
func = RNA_def_function(srna, "statistics", "ED_info_stats_string");
|
2014-01-16 21:43:22 +11:00
|
|
|
prop = RNA_def_string(func, "statistics", NULL, 0, "Statistics", "");
|
2009-08-19 12:35:40 +00:00
|
|
|
RNA_def_function_return(func, prop);
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2009-08-27 06:03:41 +00:00
|
|
|
/* Grease Pencil */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
|
2009-08-27 06:03:41 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "gpd");
|
|
|
|
|
RNA_def_property_struct_type(prop, "GreasePencil");
|
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.
The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
- Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
to enter "Stroke Edit Mode". In this mode, many common editing tools will
operate on Grease Pencil stroke points instead.
- Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
- Proportional Editing works when using the transform tools
2) Grease Pencil stroke settings can now be animated
NOTE: Currently drivers don't work, but if time allows, this may still be
added before the release.
3) Strokes can be drawn with "filled" interiors, using a separate set of
colour/opacity settings to the ones used for the lines themselves.
This makes use of OpenGL filled polys, which has the limitation of only
being able to fill convex shapes. Some artifacts may be visible on concave
shapes (e.g. pacman's mouth will be overdrawn)
4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
has been added which draws strokes as a series of screen-aligned discs.
While this was originally a partial experimental technique at getting better
quality 3D lines, the effects possible using this technique were interesting
enough to warrant making this a dedicated feature. Best results when partial
opacity and large stroke widths are used.
5) Improved Onion Skinning Support
- Different colours can be selected for the before/after ghosts. To do so,
enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
the colours accordingly.
- Different numbers of ghosts can be shown before/after the current frame
6) Grease Pencil datablocks are now attached to the scene by default instead of
the active object.
- For a long time, the object-attachment has proved to be quite problematic
for users to keep track of. Now that this is done at scene level, it is
easier for most users to use.
- An exception for old files (and for any addons which may benefit from object
attachment instead), is that if the active object has a Grease Pencil datablock,
that will be used instead.
- It is not currently possible to choose object-attachment from the UI, but
it is simple to do this from the console instead, by doing:
context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]
7) Various UI Cleanups
- The layers UI has been cleaned up to use a list instead of the nested-panels
design. Apart from saving space, this is also much nicer to look at now.
- The UI code is now all defined in Python. To support this, it has been necessary
to add some new context properties to make it easier to access these settings.
e.g. "gpencil_data" for the datablock
"active_gpencil_layer" and "active_gpencil_frame" for active data,
"editable_gpencil_strokes" for the strokes that can be edited
- The "stroke placement/alignment" settings (previously "Drawing Settings" at the
bottom of the Grease Pencil panel in the Properties Region) is now located in
the toolbar. These were more toolsettings than properties for how GPencil got drawn.
- "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
suggestion for an earlier discussion on developer.blender.org
- By default, the painting operator will wait for a mouse button to be pressed
before it starts creating the stroke. This is to make it easier to include
this operator in various toolbars/menus/etc. To get it immediately starting
(as when you hold down DKEy to draw), set "wait_for_input" to False.
- GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor
- Toolbar panels have been added to all the other editors which support these.
8) Pie menus for quick-access to tools
A set of experimental pie menus has been included for quick access to many
tools and settings. It is not necessary to use these to get things done,
but they have been designed to help make certain common tasks easier.
- Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
spatially stable manner.
- D Q = "Quick Settings" pie. This allows quick access to the active
layer's settings. Notably, colours, thickness, and turning
onion skinning on/off.
2014-12-01 01:52:06 +13:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT);
|
2015-10-24 02:44:43 +11:00
|
|
|
RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil data-block");
|
2014-12-02 00:37:00 +13:00
|
|
|
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
2009-07-20 20:28:29 +00:00
|
|
|
|
2009-10-10 17:40:56 +00:00
|
|
|
/* Transform Orientations */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "orientations", PROP_COLLECTION, PROP_NONE);
|
2009-10-10 17:40:56 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "transform_spaces", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "TransformOrientation");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Transform Orientations", "");
|
|
|
|
|
|
2011-11-07 15:19:26 +00:00
|
|
|
/* active MovieClip */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active_clip", PROP_POINTER, PROP_NONE);
|
2011-11-07 12:55:18 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "clip");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "MovieClip");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Active Movie Clip", "Active movie clip used for constraints and viewport drawing");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
2011-11-07 12:55:18 +00:00
|
|
|
|
Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
|
|
|
/* color management */
|
|
|
|
|
prop = RNA_def_property(srna, "view_settings", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "view_settings");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ColorManagedViewSettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "View Settings", "Color management settings applied on image before saving");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "display_settings", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "display_settings");
|
|
|
|
|
RNA_def_property_struct_type(prop, "ColorManagedDisplaySettings");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Display Settings", "Settings of device saved image would be displayed on");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "sequencer_colorspace_settings", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "sequencer_colorspace_settings");
|
2012-12-24 15:51:27 +00:00
|
|
|
RNA_def_property_struct_type(prop, "ColorManagedSequencerColorspaceSettings");
|
2012-09-23 18:50:56 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Sequencer Color Space Settings", "Settings of color space sequencer is working in");
|
Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
|
|
|
|
Depsgraph: New dependency graph integration commit
This commit integrates the work done so far on the new dependency graph system,
where goal was to replace legacy depsgraph with the new one, supporting loads of
neat features like:
- More granular dependency relation nature, which solves issues with fake cycles
in the dependencies.
- Move towards all-animatable, by better integration of drivers into the system.
- Lay down some basis for upcoming copy-on-write, overrides and so on.
The new system is living side-by-side with the previous one and disabled by
default, so nothing will become suddenly broken. The way to enable new depsgraph
is to pass `--new-depsgraph` command line argument.
It's a bit early to consider the system production-ready, there are some TODOs
and issues were discovered during the merge period, they'll be addressed ASAP.
But it's important to merge, because it's the only way to attract artists to
really start testing this system.
There are number of assorted documents related on the design of the new system:
* http://wiki.blender.org/index.php/User:Aligorith/GSoC2013_Depsgraph#Design_Documents
* http://wiki.blender.org/index.php/User:Nazg-gul/DependencyGraph
There are also some user-related information online:
* http://code.blender.org/2015/02/blender-dependency-graph-branch-for-users/
* http://code.blender.org/2015/03/more-dependency-graph-tricks/
Kudos to everyone who was involved into the project:
- Joshua "Aligorith" Leung -- design specification, initial code
- Lukas "lukas_t" Toenne -- integrating code into blender, with further fixes
- Sergey "Sergey" "Sharybin" -- some mocking around, trying to wrap up the
project and so
- Bassam "slikdigit" Kurdali -- stressing the new system, reporting all the
issues and recording/writing documentation.
- Everyone else who i forgot to mention here :)
2015-05-12 15:05:57 +05:00
|
|
|
/* Dependency Graph */
|
|
|
|
|
prop = RNA_def_property(srna, "depsgraph", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "Depsgraph");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Dependency Graph", "Dependencies in the scene data");
|
|
|
|
|
|
2009-08-27 06:03:41 +00:00
|
|
|
/* Nestled Data */
|
2013-02-05 14:25:22 +00:00
|
|
|
/* *** Non-Animated *** */
|
|
|
|
|
RNA_define_animate_sdna(false);
|
2009-01-17 16:58:05 +00:00
|
|
|
rna_def_tool_settings(brna);
|
2012-01-12 17:22:32 +00:00
|
|
|
rna_def_unified_paint_settings(brna);
|
2013-04-17 09:27:23 +00:00
|
|
|
rna_def_statvis(brna);
|
2009-08-13 07:37:41 +00:00
|
|
|
rna_def_unit_settings(brna);
|
2011-11-21 20:19:58 +00:00
|
|
|
rna_def_scene_image_format_data(brna);
|
2009-07-20 20:28:29 +00:00
|
|
|
rna_def_scene_game_data(brna);
|
2009-10-10 17:40:56 +00:00
|
|
|
rna_def_transform_orientation(brna);
|
2012-01-17 16:31:13 +00:00
|
|
|
rna_def_selected_uv_element(brna);
|
2015-01-19 16:30:35 +11:00
|
|
|
rna_def_display_safe_areas(brna);
|
2013-02-05 14:25:22 +00:00
|
|
|
RNA_define_animate_sdna(true);
|
|
|
|
|
/* *** Animated *** */
|
|
|
|
|
rna_def_scene_render_data(brna);
|
|
|
|
|
rna_def_scene_render_layer(brna);
|
2015-02-12 18:54:41 +01:00
|
|
|
rna_def_gpu_fx(brna);
|
2015-04-06 10:40:12 -03:00
|
|
|
rna_def_scene_render_view(brna);
|
2015-02-12 18:54:41 +01:00
|
|
|
|
2009-08-25 04:05:37 +00:00
|
|
|
/* Scene API */
|
|
|
|
|
RNA_api_scene(srna);
|
2008-10-31 23:50:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|