code cleanup: includes, also correct some py example typos

This commit is contained in:
Campbell Barton 2012-06-16 20:20:07 +00:00
parent e6a43441b9
commit b5b8306685
35 changed files with 172 additions and 157 deletions

@ -2,7 +2,7 @@
Basic Object Operations Example
+++++++++++++++++++++++++++++++
This script demonstrates basic operations on object like creating new
object, placing it into scene, selecting it and making it active
object, placing it into scene, selecting it and making it active.
"""
import bpy
@ -11,15 +11,15 @@ from mathutils import Matrix
scene = bpy.context.scene
# Create new lamp datablock
lamp_data = bpy.data.lamps.new(name="New Lamp", type="POINT")
lamp_data = bpy.data.lamps.new(name="New Lamp", type='POINT')
# Create new object with out lamp datablock
# Create new object with our lamp datablock
lamp_object = bpy.data.objects.new(name="New Lamp", object_data=lamp_data)
# Link lamp object to the scene so it'll appear in this scene
scene.objects.link(lamp_object)
# Place lamp to specified location
# Place lamp to a specified location
lamp_object.location = (5.0, 5.0, 5.0)
# And finally select it make active

@ -2,7 +2,7 @@
Simple Object Panel
+++++++++++++++++++
This panel has a :class:`Panel.poll` and :class:`Panel.draw_header` function,
even though the contents is basic this closely resemples blenders panels.
even though the contents is basic this closely resembles blenders panels.
"""
import bpy

@ -28,7 +28,7 @@
#include "AUD_PyAPI.h"
#include "structmember.h"
#include <structmember.h>
#include "AUD_I3DDevice.h"
#include "AUD_I3DHandle.h"

@ -25,8 +25,8 @@
#endif
#include <errno.h>
#include <BLI_fnmatch.h>
#include <ctype.h>
#include "BLI_fnmatch.h"
/* Comment out all this code if we are using the GNU C Library, and are not

@ -44,14 +44,14 @@
/* for checking system threads - BLI_system_thread_count */
#ifdef WIN32
#include "windows.h"
#include <sys/timeb.h>
# include <windows.h>
# include <sys/timeb.h>
#elif defined(__APPLE__)
#include <sys/types.h>
#include <sys/sysctl.h>
# include <sys/types.h>
# include <sys/sysctl.h>
#else
#include <unistd.h>
#include <sys/time.h>
# include <unistd.h>
# include <sys/time.h>
#endif
#if defined(__APPLE__) && (PARALLEL == 1) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)

@ -20,100 +20,102 @@
* Monique Dewanchand
*/
#include "COM_Converter.h"
#include <string.h>
#include "BKE_node.h"
#include "COM_CompositorNode.h"
#include "COM_RenderLayersNode.h"
#include "COM_AlphaOverNode.h"
#include "COM_BilateralBlurNode.h"
#include "COM_BlurNode.h"
#include "COM_BokehBlurNode.h"
#include "COM_BokehImageNode.h"
#include "COM_BoxMaskNode.h"
#include "COM_BrightnessNode.h"
#include "COM_ChannelMatteNode.h"
#include "COM_ChromaMatteNode.h"
#include "COM_ColorBalanceNode.h"
#include "COM_ColorCorrectionNode.h"
#include "COM_ColorCurveNode.h"
#include "COM_ColorMatteNode.h"
#include "COM_ColorNode.h"
#include "COM_ColorRampNode.h"
#include "COM_ColorSpillNode.h"
#include "COM_ColorToBWNode.h"
#include "string.h"
#include "COM_SocketConnection.h"
#include "COM_CombineHSVANode.h"
#include "COM_CombineRGBANode.h"
#include "COM_CombineYCCANode.h"
#include "COM_CombineYUVANode.h"
#include "COM_CompositorNode.h"
#include "COM_ConvertAlphaNode.h"
#include "COM_ConvertColorToVectorOperation.h"
#include "COM_ConvertColourToValueProg.h"
#include "COM_ConvertValueToColourProg.h"
#include "COM_ConvertColorToVectorOperation.h"
#include "COM_ConvertValueToVectorOperation.h"
#include "COM_ConvertVectorToColorOperation.h"
#include "COM_ConvertVectorToValueOperation.h"
#include "COM_Converter.h"
#include "COM_CropNode.h"
#include "COM_DefocusNode.h"
#include "COM_DifferenceMatteNode.h"
#include "COM_DilateErodeNode.h"
#include "COM_DirectionalBlurNode.h"
#include "COM_DisplaceNode.h"
#include "COM_DistanceMatteNode.h"
#include "COM_DoubleEdgeMaskNode.h"
#include "COM_EllipseMaskNode.h"
#include "COM_ExecutionSystem.h"
#include "COM_MixNode.h"
#include "COM_MuteNode.h"
#include "COM_TranslateNode.h"
#include "COM_RotateNode.h"
#include "COM_ScaleNode.h"
#include "COM_FlipNode.h"
#include "COM_IDMaskNode.h"
#include "COM_ExecutionSystemHelper.h"
#include "COM_FilterNode.h"
#include "COM_BrightnessNode.h"
#include "COM_SeparateRGBANode.h"
#include "COM_CombineRGBANode.h"
#include "COM_SeparateHSVANode.h"
#include "COM_CombineHSVANode.h"
#include "COM_SeparateYUVANode.h"
#include "COM_CombineYUVANode.h"
#include "COM_SeparateYCCANode.h"
#include "COM_CombineYCCANode.h"
#include "COM_AlphaOverNode.h"
#include "COM_ColorBalanceNode.h"
#include "COM_ViewerNode.h"
#include "COM_SplitViewerNode.h"
#include "COM_InvertNode.h"
#include "COM_FlipNode.h"
#include "COM_GammaNode.h"
#include "COM_GlareNode.h"
#include "COM_GroupNode.h"
#include "COM_HueSaturationValueCorrectNode.h"
#include "COM_HueSaturationValueNode.h"
#include "COM_IDMaskNode.h"
#include "COM_ImageNode.h"
#include "COM_InvertNode.h"
#include "COM_KeyingNode.h"
#include "COM_KeyingScreenNode.h"
#include "COM_LensDistortionNode.h"
#include "COM_LuminanceMatteNode.h"
#include "COM_MapUVNode.h"
#include "COM_MapValueNode.h"
#include "COM_MaskNode.h"
#include "COM_MathNode.h"
#include "COM_MixNode.h"
#include "COM_MovieClipNode.h"
#include "COM_MovieDistortionNode.h"
#include "COM_MuteNode.h"
#include "COM_NormalNode.h"
#include "COM_NormalizeNode.h"
#include "COM_ImageNode.h"
#include "COM_BokehImageNode.h"
#include "COM_ColorCurveNode.h"
#include "COM_VectorCurveNode.h"
#include "COM_SetAlphaNode.h"
#include "COM_ConvertAlphaNode.h"
#include "COM_MapUVNode.h"
#include "COM_DisplaceNode.h"
#include "COM_MathNode.h"
#include "COM_HueSaturationValueNode.h"
#include "COM_HueSaturationValueCorrectNode.h"
#include "COM_ColorCorrectionNode.h"
#include "COM_BoxMaskNode.h"
#include "COM_EllipseMaskNode.h"
#include "COM_GammaNode.h"
#include "COM_ColorRampNode.h"
#include "COM_DifferenceMatteNode.h"
#include "COM_LuminanceMatteNode.h"
#include "COM_DistanceMatteNode.h"
#include "COM_ChromaMatteNode.h"
#include "COM_ColorMatteNode.h"
#include "COM_ChannelMatteNode.h"
#include "COM_BlurNode.h"
#include "COM_BokehBlurNode.h"
#include "COM_DilateErodeNode.h"
#include "COM_TranslateOperation.h"
#include "COM_LensDistortionNode.h"
#include "COM_TextureNode.h"
#include "COM_ColorNode.h"
#include "COM_ValueNode.h"
#include "COM_TimeNode.h"
#include "COM_DirectionalBlurNode.h"
#include "COM_ZCombineNode.h"
#include "COM_SetValueOperation.h"
#include "COM_ScaleOperation.h"
#include "COM_ExecutionSystemHelper.h"
#include "COM_TonemapNode.h"
#include "COM_SwitchNode.h"
#include "COM_GlareNode.h"
#include "COM_MovieClipNode.h"
#include "COM_ColorSpillNode.h"
#include "COM_OutputFileNode.h"
#include "COM_MapValueNode.h"
#include "COM_TransformNode.h"
#include "COM_RenderLayersNode.h"
#include "COM_RotateNode.h"
#include "COM_ScaleNode.h"
#include "COM_ScaleOperation.h"
#include "COM_SeparateHSVANode.h"
#include "COM_SeparateRGBANode.h"
#include "COM_SeparateYCCANode.h"
#include "COM_SeparateYUVANode.h"
#include "COM_SetAlphaNode.h"
#include "COM_SetValueOperation.h"
#include "COM_SocketConnection.h"
#include "COM_SplitViewerNode.h"
#include "COM_Stabilize2dNode.h"
#include "COM_BilateralBlurNode.h"
#include "COM_SwitchNode.h"
#include "COM_TextureNode.h"
#include "COM_TimeNode.h"
#include "COM_TonemapNode.h"
#include "COM_TransformNode.h"
#include "COM_TranslateNode.h"
#include "COM_TranslateOperation.h"
#include "COM_ValueNode.h"
#include "COM_VectorBlurNode.h"
#include "COM_MovieDistortionNode.h"
#include "COM_VectorCurveNode.h"
#include "COM_ViewLevelsNode.h"
#include "COM_DefocusNode.h"
#include "COM_DoubleEdgeMaskNode.h"
#include "COM_CropNode.h"
#include "COM_MaskNode.h"
#include "COM_KeyingScreenNode.h"
#include "COM_KeyingNode.h"
#include "COM_ViewerNode.h"
#include "COM_ZCombineNode.h"
Node *Converter::convert(bNode *bNode)
{

@ -20,24 +20,25 @@
* Monique Dewanchand
*/
#include <algorithm>
#include <math.h>
#include <sstream>
#include <stdlib.h>
#include "BLI_math.h"
#include "PIL_time.h"
#include "COM_ExecutionGroup.h"
#include "COM_InputSocket.h"
#include "COM_SocketConnection.h"
#include "COM_defines.h"
#include "math.h"
#include "COM_ExecutionSystem.h"
#include <sstream>
#include "COM_ReadBufferOperation.h"
#include "COM_WriteBufferOperation.h"
#include "COM_ReadBufferOperation.h"
#include "COM_WorkScheduler.h"
#include "COM_ViewerOperation.h"
#include <stdlib.h>
#include "BLI_math.h"
#include "PIL_time.h"
#include "COM_ChunkOrder.h"
#include <algorithm>
#include "BLI_math.h"
#include "COM_ExecutionSystemHelper.h"
ExecutionGroup::ExecutionGroup()

@ -22,16 +22,18 @@
#include "COM_ExecutionSystem.h"
#include <sstream>
#include <stdio.h>
#include "PIL_time.h"
#include "BKE_node.h"
#include "COM_Converter.h"
#include <sstream>
#include "COM_NodeOperation.h"
#include "COM_ExecutionGroup.h"
#include "COM_NodeBase.h"
#include "COM_WorkScheduler.h"
#include "COM_ReadBufferOperation.h"
#include "stdio.h"
#include "COM_GroupNode.h"
#include "COM_WriteBufferOperation.h"
#include "COM_ReadBufferOperation.h"

@ -22,16 +22,18 @@
#include "COM_ExecutionSystemHelper.h"
#include <sstream>
#include <stdio.h>
#include "PIL_time.h"
#include "BKE_node.h"
#include "COM_Converter.h"
#include <sstream>
#include "COM_NodeOperation.h"
#include "COM_ExecutionGroup.h"
#include "COM_NodeBase.h"
#include "COM_WorkScheduler.h"
#include "COM_ReadBufferOperation.h"
#include "stdio.h"
#include "COM_GroupNode.h"
#include "COM_WriteBufferOperation.h"
#include "COM_ReadBufferOperation.h"

@ -20,11 +20,12 @@
* Monique Dewanchand
*/
#include "COM_Node.h"
#include "string.h"
#include <string.h>
#include "COM_NodeOperation.h"
#include "BKE_node.h"
#include "COM_Node.h"
#include "COM_NodeOperation.h"
#include "COM_SetValueOperation.h"
#include "COM_SetVectorOperation.h"
#include "COM_SetColorOperation.h"
@ -35,7 +36,7 @@
#include "COM_SocketProxyNode.h"
//#include "stdio.h"
//#include <stdio.h>
#include "COM_defines.h"
Node::Node(bNode *editorNode, bool create_sockets)

@ -20,10 +20,12 @@
* Monique Dewanchand
*/
#include "COM_NodeBase.h"
#include "string.h"
#include "COM_NodeOperation.h"
#include <string.h>
#include "BKE_node.h"
#include "COM_NodeBase.h"
#include "COM_NodeOperation.h"
#include "COM_SetValueOperation.h"
#include "COM_SetColorOperation.h"
#include "COM_SocketConnection.h"

@ -20,12 +20,13 @@
* Monique Dewanchand
*/
#include "COM_NodeOperation.h"
#include <typeinfo>
#include <stdio.h>
#include "COM_NodeOperation.h"
#include "COM_InputSocket.h"
#include "COM_SocketConnection.h"
#include "COM_defines.h"
#include "stdio.h"
NodeOperation::NodeOperation()
{

@ -21,15 +21,18 @@
*/
#include <list>
#include <stdio.h>
#include "BKE_global.h"
#include "COM_WorkScheduler.h"
#include "PIL_time.h"
#include "BLI_threads.h"
#include "COM_CPUDevice.h"
#include "COM_OpenCLDevice.h"
#include "OCL_opencl.h"
#include "stdio.h"
#include "COM_OpenCLKernels.cl.h"
#include "BKE_global.h"
#include "OCL_opencl.h"
#include "PIL_time.h"
#include "BLI_threads.h"
#if COM_CURRENT_THREADING_MODEL == COM_TM_NOTHREAD
#warning COM_CURRENT_THREADING_MODEL COM_TM_NOTHREAD is activated. Use only for debugging.

@ -20,9 +20,10 @@
* Monique Dewanchand
*/
#include <stdio.h>
#include "COM_MuteNode.h"
#include "COM_SocketConnection.h"
#include "stdio.h"
#include "COM_SetValueOperation.h"
#include "COM_SetVectorOperation.h"
#include "COM_SetColorOperation.h"

@ -34,13 +34,13 @@
#include <stddef.h>
#include <math.h>
#include "BoolValue.h"
#include "IntValue.h"
#include "FloatValue.h"
#include "SCA_IActuator.h"
#include "SCA_RandomActuator.h"
#include "math.h"
#include "MT_Transform.h"
/* ------------------------------------------------------------------------- */

@ -27,7 +27,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#include <sstream>
#include <fstream>
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include "Exception.h"

@ -27,7 +27,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#include "FilterBase.h"
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>

@ -29,7 +29,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#include "Common.h"
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include "PyTypeList.h"

@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt.
* \ingroup bgevideotex
*/
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include "FilterBlueScreen.h"

@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt.
* \ingroup bgevideotex
*/
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include "FilterColor.h"

@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt.
* \ingroup bgevideotex
*/
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include "FilterNormal.h"

@ -26,7 +26,7 @@ http://www.gnu.org/copyleft/lesser.txt.
// implementation
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include "FilterSource.h"

@ -33,7 +33,7 @@ extern "C" {
#include <vector>
#include <string.h>
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include "FilterBase.h"

@ -30,7 +30,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#include "Common.h"
#include <vector>
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include "PyTypeList.h"

@ -26,7 +26,7 @@ http://www.gnu.org/copyleft/lesser.txt.
// implementation
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include "ImageBuff.h"

@ -27,7 +27,7 @@ http://www.gnu.org/copyleft/lesser.txt.
// implementation
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include "ImageMix.h"

@ -26,7 +26,7 @@ http://www.gnu.org/copyleft/lesser.txt.
// implementation
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include <float.h>
#include <math.h>

@ -30,12 +30,12 @@ http://www.gnu.org/copyleft/lesser.txt.
#include "Common.h"
#include <KX_Scene.h>
#include <KX_Camera.h>
#include <DNA_screen_types.h>
#include <RAS_ICanvas.h>
#include <RAS_IRasterizer.h>
#include <RAS_IRenderTools.h>
#include "KX_Scene.h"
#include "KX_Camera.h"
#include "DNA_screen_types.h"
#include "RAS_ICanvas.h"
#include "RAS_IRasterizer.h"
#include "RAS_IRenderTools.h"
#include "ImageViewport.h"

@ -26,7 +26,7 @@ http://www.gnu.org/copyleft/lesser.txt.
// implementation
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include "GL/glew.h"

@ -29,7 +29,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#include <memory>
#include <vector>
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
/// destructor
PyTypeList::~PyTypeList()

@ -32,7 +32,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#include <memory>
#include <vector>
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
// forward declaration
class PyTypeListItem;

@ -26,22 +26,22 @@ http://www.gnu.org/copyleft/lesser.txt.
// implementation
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include <KX_GameObject.h>
#include <KX_Light.h>
#include <RAS_MeshObject.h>
#include <DNA_mesh_types.h>
#include <DNA_meshdata_types.h>
#include <DNA_image_types.h>
#include <IMB_imbuf_types.h>
#include <KX_PolygonMaterial.h>
#include "KX_GameObject.h"
#include "KX_Light.h"
#include "RAS_MeshObject.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_image_types.h"
#include "IMB_imbuf_types.h"
#include "KX_PolygonMaterial.h"
#include <MEM_guardedalloc.h>
#include "MEM_guardedalloc.h"
#include <KX_BlenderMaterial.h>
#include <BL_Texture.h>
#include "KX_BlenderMaterial.h"
#include "BL_Texture.h"
#include "KX_KetsjiEngine.h"
#include "KX_PythonInit.h"

@ -27,12 +27,12 @@ http://www.gnu.org/copyleft/lesser.txt.
#ifndef __TEXTURE_H__
#define __TEXTURE_H__
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <structmember.h>
#include <DNA_image_types.h>
#include <BL_Texture.h>
#include <KX_BlenderMaterial.h>
#include "DNA_image_types.h"
#include "BL_Texture.h"
#include "KX_BlenderMaterial.h"
#include "ImageBase.h"
#include "BlendType.h"

@ -28,7 +28,7 @@ http://www.gnu.org/copyleft/lesser.txt.
#define __VIDEOBASE_H__
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include "ImageBase.h"

@ -24,7 +24,7 @@ http://www.gnu.org/copyleft/lesser.txt.
* \ingroup bgevideotex
*/
#include <PyObjectPlus.h>
#include "PyObjectPlus.h"
#include <RAS_GLExtensionManager.h>