Blender V2.61 - r43446
Defines | Functions | Variables

object_edit.c File Reference

#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <float.h>
#include <ctype.h>
#include <stddef.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_editVert.h"
#include "BLI_ghash.h"
#include "BLI_rand.h"
#include "DNA_armature_types.h"
#include "DNA_curve_types.h"
#include "DNA_group_types.h"
#include "DNA_lattice_types.h"
#include "DNA_material_types.h"
#include "DNA_meta_types.h"
#include "DNA_property_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_meshdata_types.h"
#include "DNA_vfont_types.h"
#include "IMB_imbuf_types.h"
#include "BKE_anim.h"
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_effect.h"
#include "BKE_depsgraph.h"
#include "BKE_font.h"
#include "BKE_image.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_pointcache.h"
#include "BKE_property.h"
#include "BKE_sca.h"
#include "BKE_softbody.h"
#include "BKE_modifier.h"
#include "ED_armature.h"
#include "ED_curve.h"
#include "ED_mesh.h"
#include "ED_mball.h"
#include "ED_lattice.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_util.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "UI_interface.h"
#include "WM_api.h"
#include "WM_types.h"
#include "object_intern.h"

Go to the source code of this file.

Defines

#define COPY_PROPERTIES_REPLACE   1
#define COPY_PROPERTIES_MERGE   2
#define COPY_PROPERTIES_COPY   3

Functions

static void error (const char *UNUSED(arg))
static void waitcursor (int UNUSED(val))
static int pupmenu (const char *UNUSED(msg))
static void error_libdata (void)
ObjectED_object_context (bContext *C)
ObjectED_object_active_context (bContext *C)
static int object_hide_view_clear_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_hide_view_clear (wmOperatorType *ot)
static int object_hide_view_set_exec (bContext *C, wmOperator *op)
void OBJECT_OT_hide_view_set (wmOperatorType *ot)
static int object_hide_render_clear_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_hide_render_clear (wmOperatorType *ot)
static int object_hide_render_set_exec (bContext *C, wmOperator *op)
void OBJECT_OT_hide_render_set (wmOperatorType *ot)
void ED_object_exit_editmode (bContext *C, int flag)
void ED_object_enter_editmode (bContext *C, int flag)
static int editmode_toggle_exec (bContext *C, wmOperator *UNUSED(op))
static int editmode_toggle_poll (bContext *C)
void OBJECT_OT_editmode_toggle (wmOperatorType *ot)
static int posemode_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_posemode_toggle (wmOperatorType *ot)
static void copymenu_properties (Scene *scene, View3D *v3d, Object *ob)
static void copymenu_logicbricks (Scene *scene, View3D *v3d, Object *ob)
static void copy_texture_space (Object *to, Object *ob)
static void copy_attr (Main *bmain, Scene *scene, View3D *v3d, short event)
static void UNUSED_FUNCTION() copy_attr_menu (Main *bmain, Scene *scene, View3D *v3d)
static int forcefield_toggle_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_forcefield_toggle (wmOperatorType *ot)
void ED_objects_recalculate_paths (bContext *C, Scene *scene)
static int object_calculate_paths_exec (bContext *C, wmOperator *op)
void OBJECT_OT_paths_calculate (wmOperatorType *ot)
void ED_objects_clear_paths (bContext *C)
static int object_clear_paths_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_paths_clear (wmOperatorType *ot)
static int shade_smooth_exec (bContext *C, wmOperator *op)
static int shade_poll (bContext *C)
void OBJECT_OT_shade_flat (wmOperatorType *ot)
void OBJECT_OT_shade_smooth (wmOperatorType *ot)
static void UNUSED_FUNCTION() image_aspect (Scene *scene, View3D *v3d)
static EnumPropertyItemobject_mode_set_itemsf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
static const char * object_mode_op_string (int mode)
static int object_mode_set_compat (bContext *UNUSED(C), wmOperator *op, Object *ob)
static int object_mode_set_exec (bContext *C, wmOperator *op)
void OBJECT_OT_mode_set (wmOperatorType *ot)
void ED_object_toggle_modes (bContext *C, int mode)
static int game_property_new (bContext *C, wmOperator *op)
void OBJECT_OT_game_property_new (wmOperatorType *ot)
static int game_property_remove (bContext *C, wmOperator *op)
void OBJECT_OT_game_property_remove (wmOperatorType *ot)
static EnumPropertyItemgameprops_itemf (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
static int game_property_copy_exec (bContext *C, wmOperator *op)
void OBJECT_OT_game_property_copy (wmOperatorType *ot)
static int game_property_clear_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_game_property_clear (wmOperatorType *ot)
static int logicbricks_copy_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_logic_bricks_copy (wmOperatorType *ot)
static int game_physics_copy_exec (bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_game_physics_copy (struct wmOperatorType *ot)

Variables

static EnumPropertyItem game_properties_copy_operations []
static EnumPropertyItem gameprops_items []

Detailed Description

Definition in file object_edit.c.


Define Documentation

#define COPY_PROPERTIES_COPY   3

Definition at line 1561 of file object_edit.c.

#define COPY_PROPERTIES_MERGE   2

Definition at line 1560 of file object_edit.c.

#define COPY_PROPERTIES_REPLACE   1

Definition at line 1559 of file object_edit.c.

Referenced by game_property_copy_exec().


Function Documentation

static void copy_attr ( Main bmain,
Scene scene,
View3D v3d,
short  event 
) [static]

Definition at line 734 of file object_edit.c.

References BASACT, Curve::bevobj, Curve::bevresol, BKE_text_to_curve(), BLI_addhead(), BLI_addtail(), BLI_strncpy(), Object::bsoft, Object::col, Object::collision_boundtype, Object::constraints, copy_bulletsoftbody(), copy_constraints(), copy_qt_qt(), copy_softbody(), copy_texture_space(), copy_v3_v3(), copy_v4_v4(), copymenu_logicbricks(), copymenu_properties(), CU_UV_ORCO, DAG_ids_flush_update(), DAG_scene_sort(), Object::damping, Object::data, Object::dloc, Object::dquat, Object::drot, Object::dscale, Object::dt, Object::dtx, Object::dup_group, Object::dupend, Object::dupoff, Object::dupon, Object::dupsta, ELEM, eModifierType_Softbody, eModifierType_Subsurf, Object::empty_drawsize, Object::empty_drawtype, Curve::ext1, Curve::ext2, Curve::family, ListBase::first, FIRSTBASE, Curve::flag, Mesh::flag, Object::formfactor, Curve::fsize, Object::gameflag, VFont::id, Group::id, Scene::id, id_lib_extern(), id_us_plus(), Object::index, Object::inertia, ID::lib, Curve::linedist, Object::loc, Object::margin, Object::mass, Object::max_vel, ME_AUTOSMOOTH, Object::min_vel, modifier_copyData(), modifier_new(), Object::modifiers, modifiers_findByType(), Nurb::next, Base::next, Curve::nurb, OB_BOUNDS, OB_CURVE, OB_DUPLI, OB_FONT, OB_MESH, OB_RECALC_DATA, OB_RECALC_OB, OB_SURF, OBACT, Scene::obedit, Base::object, Object::protectflag, Object::quat, Object::rdamping, Object::recalc, Nurb::resolu, Curve::resolu, Curve::resolu_ren, Object::rot, sbFree(), Object::sf, Curve::shear, Object::size, Mesh::smoothresh, Object::soft, Object::softflag, Curve::spacemode, Curve::spacing, Curve::taperobj, TESTBASELIB, Curve::textoncurve, Object::transflag, TRUE, Object::type, Curve::ulheight, Curve::ulpos, ID::us, Curve::vfont, Curve::vfontb, Curve::vfontbi, Curve::vfonti, Curve::width, Curve::wordspace, Curve::xof, and Curve::yof.

Referenced by copy_attr_menu().

static void UNUSED_FUNCTION() copy_attr_menu ( Main bmain,
Scene scene,
View3D v3d 
) [static]
static void copy_texture_space ( Object to,
Object ob 
) [static]
static void copymenu_logicbricks ( Scene scene,
View3D v3d,
Object ob 
) [static]
static void copymenu_properties ( Scene scene,
View3D v3d,
Object ob 
) [static]
Object* ED_object_active_context ( bContext C) [read]

Definition at line 120 of file object_edit.c.

References CTX_data_active_object(), ED_object_context(), and NULL.

Referenced by childof_clear_inverse_exec(), childof_set_inverse_exec(), constraint_move_down_exec(), constraint_move_up_exec(), ED_operator_object_active(), ED_operator_object_active_editable(), ED_operator_object_active_editable_font(), ED_operator_object_active_editable_mesh(), ED_operator_outliner_active_no_editobject(), edit_constraint_invoke_properties(), edit_constraint_poll_generic(), edit_modifier_poll_generic(), edit_object_property_get(), explode_refresh_exec(), game_physics_copy_exec(), game_property_copy_exec(), gameprops_itemf(), get_new_constraint_target(), limitdistance_reset_exec(), logicbricks_copy_exec(), make_links_data_exec(), make_proxy_exec(), make_proxy_invoke(), meshdeform_bind_exec(), modifier_add_exec(), modifier_add_itemf(), modifier_apply_exec(), modifier_convert_exec(), modifier_copy_exec(), modifier_move_down_exec(), modifier_move_up_exec(), modifier_remove_exec(), multires_base_apply_exec(), multires_external_pack_exec(), multires_external_save_exec(), multires_external_save_invoke(), multires_higher_levels_delete_exec(), multires_reshape_exec(), multires_subdivide_exec(), navmesh_clear_exec(), navmesh_obmode_data_poll(), navmesh_obmode_poll(), navmesh_reset_exec(), object_constraint_add_exec(), object_constraint_copy_exec(), objectsolver_clear_inverse_exec(), objectsolver_set_inverse_exec(), ocean_bake_exec(), parent_noinv_set_exec(), parent_set_exec(), parent_set_invoke(), pose_constraint_add_exec(), proxy_group_object_itemf(), stretchto_reset_exec(), and track_set_exec().

Object* ED_object_context ( bContext C) [read]

Definition at line 113 of file object_edit.c.

References CTX_data_pointer_get_type(), PointerRNA::data, and RNA_Object.

Referenced by connect_hair_exec(), disconnect_hair_exec(), dynamicPaint_initBake(), ED_object_active_context(), get_poselib_object(), group_add_exec(), group_link_exec(), group_move_exec(), group_remove_exec(), group_sort_exec(), layers_poll(), material_slot_add_exec(), material_slot_assign_exec(), material_slot_copy_exec(), material_slot_de_select(), material_slot_remove_exec(), output_toggle_exec(), particle_system_add_exec(), particle_system_remove_exec(), pose_calculate_paths_exec(), pose_clear_paths_exec(), pose_de_select_all_exec(), pose_group_add_exec(), pose_group_assign_exec(), pose_group_deselect_exec(), pose_group_remove_exec(), pose_group_select_exec(), pose_group_unassign_exec(), pose_groups_menu_invoke(), set_active_group_exec(), shape_key_add_exec(), shape_key_clear_exec(), shape_key_mirror_exec(), shape_key_mode_poll(), shape_key_move_exec(), shape_key_poll(), shape_key_remove_exec(), sticky_add_exec(), sticky_remove_exec(), surface_slot_add_exec(), surface_slot_remove_exec(), type_toggle_exec(), uv_texture_add_exec(), uv_texture_remove_exec(), vertex_color_add_exec(), vertex_color_remove_exec(), vertex_group_add_exec(), vertex_group_assign_exec(), vertex_group_blend_exec(), vertex_group_clean_exec(), vertex_group_copy_exec(), vertex_group_copy_to_linked_exec(), vertex_group_copy_to_selected_exec(), vertex_group_deselect_exec(), vertex_group_invert_exec(), vertex_group_levels_exec(), vertex_group_mirror_exec(), vertex_group_normalize_all_exec(), vertex_group_normalize_exec(), vertex_group_poll(), vertex_group_poll_edit(), vertex_group_poll_edit_or_wpaint_vert_select(), vertex_group_remove_exec(), vertex_group_remove_from_exec(), vertex_group_select_exec(), vertex_group_sort_exec(), vgroup_itemf(), and vgroup_move_exec().

void ED_object_enter_editmode ( bContext C,
int  flag 
)
void ED_object_exit_editmode ( bContext C,
int  flag 
)
void ED_object_toggle_modes ( bContext C,
int  mode 
)
void ED_objects_clear_paths ( bContext C)
void ED_objects_recalculate_paths ( bContext C,
Scene scene 
)
static int editmode_toggle_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int editmode_toggle_poll ( bContext C) [static]
static void error ( const char *  UNUSEDarg) [static]

Definition at line 106 of file object_edit.c.

Referenced by ED_object_exit_editmode().

static void error_libdata ( void  ) [static]

Definition at line 111 of file object_edit.c.

Referenced by ED_object_enter_editmode().

static int forcefield_toggle_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int game_physics_copy_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int game_property_clear_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int game_property_copy_exec ( bContext C,
wmOperator op 
) [static]
static int game_property_new ( bContext C,
wmOperator op 
) [static]
static int game_property_remove ( bContext C,
wmOperator op 
) [static]
static EnumPropertyItem* gameprops_itemf ( bContext C,
PointerRNA UNUSEDptr,
PropertyRNA UNUSEDprop,
int *  free 
) [static]
static void UNUSED_FUNCTION() image_aspect ( Scene scene,
View3D v3d 
) [static]
static int logicbricks_copy_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int object_calculate_paths_exec ( bContext C,
wmOperator op 
) [static]
static int object_clear_paths_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int object_hide_render_clear_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int object_hide_render_set_exec ( bContext C,
wmOperator op 
) [static]
static int object_hide_view_clear_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int object_hide_view_set_exec ( bContext C,
wmOperator op 
) [static]
static const char* object_mode_op_string ( int  mode) [static]
static int object_mode_set_compat ( bContext UNUSEDC,
wmOperator op,
Object ob 
) [static]
static int object_mode_set_exec ( bContext C,
wmOperator op 
) [static]
static EnumPropertyItem* object_mode_set_itemsf ( bContext C,
PointerRNA UNUSEDptr,
PropertyRNA UNUSEDprop,
int *  free 
) [static]
void OBJECT_OT_editmode_toggle ( wmOperatorType ot)
void OBJECT_OT_forcefield_toggle ( wmOperatorType ot)
void OBJECT_OT_game_physics_copy ( struct wmOperatorType ot)
void OBJECT_OT_game_property_clear ( wmOperatorType ot)
void OBJECT_OT_game_property_copy ( wmOperatorType ot)
void OBJECT_OT_game_property_new ( wmOperatorType ot)
void OBJECT_OT_game_property_remove ( wmOperatorType ot)
void OBJECT_OT_hide_render_clear ( wmOperatorType ot)
void OBJECT_OT_hide_render_set ( wmOperatorType ot)
void OBJECT_OT_hide_view_clear ( wmOperatorType ot)
void OBJECT_OT_hide_view_set ( wmOperatorType ot)
void OBJECT_OT_logic_bricks_copy ( wmOperatorType ot)
void OBJECT_OT_mode_set ( wmOperatorType ot)
void OBJECT_OT_paths_calculate ( wmOperatorType ot)
void OBJECT_OT_paths_clear ( wmOperatorType ot)
void OBJECT_OT_posemode_toggle ( wmOperatorType ot)
void OBJECT_OT_shade_flat ( wmOperatorType ot)
void OBJECT_OT_shade_smooth ( wmOperatorType ot)
static int posemode_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int pupmenu ( const char *  UNUSEDmsg) [static]

Definition at line 108 of file object_edit.c.

Referenced by copy_attr_menu(), and copymenu_properties().

static int shade_poll ( bContext C) [static]
static int shade_smooth_exec ( bContext C,
wmOperator op 
) [static]
static void waitcursor ( int   UNUSEDval) [static]

Definition at line 107 of file object_edit.c.

Referenced by ED_object_enter_editmode(), and ED_object_exit_editmode().


Variable Documentation

Initial value:
{
    {COPY_PROPERTIES_REPLACE, "REPLACE", 0, "Replace Properties", ""},
    {COPY_PROPERTIES_MERGE, "MERGE", 0, "Merge Properties", ""},
    {COPY_PROPERTIES_COPY, "COPY", 0, "Copy a Property", ""},
    {0, NULL, 0, NULL, NULL}}

Definition at line 1563 of file object_edit.c.

Initial value:
 {
    {0, NULL, 0, NULL, NULL}}

Definition at line 1569 of file object_edit.c.

Referenced by gameprops_itemf().