2011-02-21 07:25:24 +00:00
|
|
|
/*
|
2008-01-01 18:29:19 +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
|
2018-06-01 18:19:39 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2008-01-01 18:29:19 +00:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-01-01 18:29:19 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
2018-06-01 18:19:39 +02:00
|
|
|
*
|
2008-01-01 18:29:19 +00:00
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
2011-02-21 07:25:24 +00:00
|
|
|
|
|
|
|
/** \file ED_object.h
|
|
|
|
* \ingroup editors
|
|
|
|
*/
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __ED_OBJECT_H__
|
|
|
|
#define __ED_OBJECT_H__
|
2008-01-01 18:29:19 +00:00
|
|
|
|
2010-10-05 00:05:14 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2017-05-31 01:31:14 +10:00
|
|
|
struct bFaceMap;
|
2017-11-09 15:44:56 -02:00
|
|
|
struct Base;
|
2012-01-22 10:20:30 +00:00
|
|
|
struct EnumPropertyItem;
|
2012-07-25 19:45:34 +00:00
|
|
|
struct ID;
|
2010-08-01 12:47:49 +00:00
|
|
|
struct Main;
|
2009-05-21 15:36:16 +00:00
|
|
|
struct ModifierData;
|
2010-08-01 12:47:49 +00:00
|
|
|
struct Object;
|
|
|
|
struct ReportList;
|
|
|
|
struct Scene;
|
2017-11-22 10:52:39 -02:00
|
|
|
struct ViewLayer;
|
2012-10-10 03:13:02 +00:00
|
|
|
struct bConstraint;
|
|
|
|
struct bContext;
|
|
|
|
struct bPoseChannel;
|
2010-08-01 12:47:49 +00:00
|
|
|
struct wmKeyConfig;
|
|
|
|
struct wmKeyMap;
|
|
|
|
struct wmOperator;
|
|
|
|
struct wmOperatorType;
|
2018-04-05 18:20:27 +02:00
|
|
|
struct wmWindow;
|
|
|
|
struct wmWindowManager;
|
2013-06-23 15:37:08 +00:00
|
|
|
struct PointerRNA;
|
|
|
|
struct PropertyRNA;
|
|
|
|
struct EnumPropertyItem;
|
2018-04-06 12:07:27 +02:00
|
|
|
struct Depsgraph;
|
2013-06-23 15:37:08 +00:00
|
|
|
|
2018-02-06 22:53:09 +11:00
|
|
|
#include "DNA_object_enums.h"
|
|
|
|
|
2009-01-30 15:01:14 +00:00
|
|
|
/* object_edit.c */
|
2012-01-02 17:15:24 +00:00
|
|
|
struct Object *ED_object_context(struct bContext *C); /* context.object */
|
|
|
|
struct Object *ED_object_active_context(struct bContext *C); /* context.object or context.active_object */
|
2010-03-31 00:55:01 +00:00
|
|
|
|
|
|
|
/* object_ops.c */
|
2008-12-23 19:47:33 +00:00
|
|
|
void ED_operatortypes_object(void);
|
2009-10-12 12:54:08 +00:00
|
|
|
void ED_operatormacros_object(void);
|
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note
that editing one item in a keymap means the whole keymap is now defined by
the user and will not be updated by Blender, an option for syncing might be
added later. The outliner interface is still there, but I will probably
remove it.
There's actually 3 levels now:
* Default builtin key configuration.
* Key configuration loaded from .py file, for configs like Blender 2.4x
or other 3D applications.
* Keymaps edited by the user and saved in .B.blend. These can be saved
to .py files as well to make creating distributable configurations
easier.
Also, user preferences sections were reorganized a bit, now there is:
Interface, Editing, Input, Files and System.
Implementation notes:
* wmKeyConfig was added which represents a key configuration containing
keymaps.
* wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap.
* Modal maps are not wrapped yet.
* User preferences DNA file reading did not support newdataadr() yet,
added this now for reading keymaps.
* Key configuration related settings are now RNA wrapped.
* is_property_set and is_property_hidden python methods were added.
2009-10-08 18:40:03 +00:00
|
|
|
void ED_keymap_object(struct wmKeyConfig *keyconf);
|
2008-12-23 19:47:33 +00:00
|
|
|
|
2012-01-22 10:20:30 +00:00
|
|
|
/* object_relations.c */
|
|
|
|
typedef enum eParentType {
|
|
|
|
PAR_OBJECT,
|
|
|
|
PAR_ARMATURE,
|
|
|
|
PAR_ARMATURE_NAME,
|
|
|
|
PAR_ARMATURE_ENVELOPE,
|
|
|
|
PAR_ARMATURE_AUTO,
|
|
|
|
PAR_BONE,
|
2013-02-12 14:42:46 +00:00
|
|
|
PAR_BONE_RELATIVE,
|
2012-01-22 10:20:30 +00:00
|
|
|
PAR_CURVE,
|
|
|
|
PAR_FOLLOW,
|
|
|
|
PAR_PATH_CONST,
|
|
|
|
PAR_LATTICE,
|
|
|
|
PAR_VERTEX,
|
2015-06-23 17:35:55 +02:00
|
|
|
PAR_VERTEX_TRI,
|
2012-01-22 10:20:30 +00:00
|
|
|
} eParentType;
|
|
|
|
|
2017-12-04 17:19:34 +11:00
|
|
|
typedef enum eObjectSelect_Mode {
|
2017-11-08 12:16:49 -02:00
|
|
|
BA_DESELECT = 0,
|
|
|
|
BA_SELECT = 1,
|
|
|
|
BA_INVERT = 2,
|
|
|
|
} eObjectSelect_Mode;
|
|
|
|
|
2012-10-10 03:13:02 +00:00
|
|
|
#ifdef __RNA_TYPES_H__
|
2012-01-22 10:20:30 +00:00
|
|
|
extern struct EnumPropertyItem prop_clear_parent_types[];
|
|
|
|
extern struct EnumPropertyItem prop_make_parent_types[];
|
2012-10-10 03:13:02 +00:00
|
|
|
#endif
|
2012-01-22 10:20:30 +00:00
|
|
|
|
2017-07-21 11:53:13 +02:00
|
|
|
bool ED_object_parent_set(struct ReportList *reports, const struct bContext *C, struct Scene *scene, struct Object *ob,
|
2014-10-10 18:26:46 +02:00
|
|
|
struct Object *par, int partype, const bool xmirror, const bool keep_transform,
|
|
|
|
const int vert_par[3]);
|
|
|
|
void ED_object_parent_clear(struct Object *ob, const int type);
|
2012-01-22 10:20:30 +00:00
|
|
|
|
2012-05-30 08:02:49 +00:00
|
|
|
void ED_keymap_proportional_cycle(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap);
|
|
|
|
void ED_keymap_proportional_obmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap);
|
2012-06-04 16:42:58 +00:00
|
|
|
void ED_keymap_proportional_maskmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap);
|
2012-05-30 08:02:49 +00:00
|
|
|
void ED_keymap_proportional_editmode(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap,
|
2014-03-31 23:39:08 +11:00
|
|
|
const bool do_connected);
|
2009-10-13 15:30:19 +00:00
|
|
|
|
2017-11-08 12:16:49 -02:00
|
|
|
void ED_object_base_select(struct Base *base, eObjectSelect_Mode mode);
|
Render Layers and Collections (merge from render-layers)
Design Documents
----------------
* https://wiki.blender.org/index.php/Dev:2.8/Source/Layers
* https://wiki.blender.org/index.php/Dev:2.8/Source/DataDesignRevised
User Commit Log
---------------
* New Layer and Collection system to replace render layers and viewport layers.
* A layer is a set of collections of objects (and their drawing options) required for specific tasks.
* A collection is a set of objects, equivalent of the old layers in Blender. A collection can be shared across multiple layers.
* All Scenes have a master collection that all other collections are children of.
* New collection "context" tab (in Properties Editor)
* New temporary viewport "collections" panel to control per-collection
visibility
Missing User Features
---------------------
* Collection "Filter"
Option to add objects based on their names
* Collection Manager operators
The existing buttons are placeholders
* Collection Manager drawing
The editor main region is empty
* Collection Override
* Per-Collection engine settings
This will come as a separate commit, as part of the clay-engine branch
Dev Commit Log
--------------
* New DNA file (DNA_layer_types.h) with the new structs
We are replacing Base by a new extended Base while keeping it backward
compatible with some legacy settings (i.e., lay, flag_legacy).
Renamed all Base to BaseLegacy to make it clear the areas of code that
still need to be converted
Note: manual changes were required on - deg_builder_nodes.h, rna_object.c, KX_Light.cpp
* Unittesting for main syncronization requirements
- read, write, add/copy/remove objects, copy scene, collection
link/unlinking, context)
* New Editor: Collection Manager
Based on patch by Julian Eisel
This is extracted from the layer-manager branch. With the following changes:
- Renamed references of layer manager to collections manager
- I doesn't include the editors/space_collections/ draw and util files
- The drawing code itself will be implemented separately by Julian
* Base / Object:
A little note about them. Original Blender code would try to keep them
in sync through the code, juggling flags back and forth. This will now
be handled by Depsgraph, keeping Object and Bases more separated
throughout the non-rendering code.
Scene.base is being cleared in doversion, and the old viewport drawing
code was poorly converted to use the new bases while the new viewport
code doesn't get merged and replace the old one.
Python API Changes
------------------
```
- scene.layers
+ # no longer exists
- scene.objects
+ scene.scene_layers.active.objects
- scene.objects.active
+ scene.render_layers.active.objects.active
- bpy.context.scene.objects.link()
+ bpy.context.scene_collection.objects.link()
- bpy_extras.object_utils.object_data_add(context, obdata, operator=None, use_active_layer=True, name=None)
+ bpy_extras.object_utils.object_data_add(context, obdata, operator=None, name=None)
- bpy.context.object.select
+ bpy.context.object.select = True
+ bpy.context.object.select = False
+ bpy.context.object.select_get()
+ bpy.context.object.select_set(action='SELECT')
+ bpy.context.object.select_set(action='DESELECT')
-AddObjectHelper.layers
+ # no longer exists
```
2017-02-07 10:18:38 +01:00
|
|
|
void ED_object_base_activate(struct bContext *C, struct Base *base);
|
2017-11-09 13:11:20 -02:00
|
|
|
void ED_object_base_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Object *ob);
|
2008-12-30 13:16:14 +00:00
|
|
|
|
2012-08-11 22:12:32 +00:00
|
|
|
/* single object duplicate, if (dupflag == 0), fully linked, else it uses the flags given */
|
2017-11-23 13:51:49 -02:00
|
|
|
struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, struct Base *base, int dupflag);
|
2009-01-05 15:19:31 +00:00
|
|
|
|
2014-10-10 18:26:46 +02:00
|
|
|
void ED_object_parent(struct Object *ob, struct Object *parent, const int type, const char *substr);
|
2009-01-05 15:19:31 +00:00
|
|
|
|
2009-01-01 18:05:12 +00:00
|
|
|
/* bitflags for enter/exit editmode */
|
2018-04-10 20:13:31 +02:00
|
|
|
enum {
|
|
|
|
EM_FREEDATA = (1 << 0),
|
|
|
|
EM_WAITCURSOR = (1 << 1),
|
|
|
|
EM_IGNORE_LAYER = (1 << 3),
|
2018-04-16 16:27:55 +02:00
|
|
|
EM_NO_CONTEXT = (1 << 4),
|
2018-04-10 20:13:31 +02:00
|
|
|
};
|
2018-05-30 08:49:34 +02:00
|
|
|
bool ED_object_editmode_exit_ex(
|
2018-06-06 16:25:28 +02:00
|
|
|
struct Main *bmain, struct Scene *scene, struct Object *obedit, int flag);
|
2018-05-30 08:41:06 +02:00
|
|
|
bool ED_object_editmode_exit(struct bContext *C, int flag);
|
2018-04-16 16:27:55 +02:00
|
|
|
|
2018-06-01 17:26:36 +02:00
|
|
|
bool ED_object_editmode_enter_ex(struct Main *bmain, struct Scene *scene, struct Object *ob, int flag);
|
2018-05-30 08:41:06 +02:00
|
|
|
bool ED_object_editmode_enter(struct bContext *C, int flag);
|
2018-06-01 17:08:38 +02:00
|
|
|
bool ED_object_editmode_load(struct Main *bmain, struct Object *obedit);
|
2008-12-30 13:16:14 +00:00
|
|
|
|
2015-02-23 23:05:54 +11:00
|
|
|
bool ED_object_editmode_calc_active_center(struct Object *obedit, const bool select_only, float r_center[3]);
|
|
|
|
|
2018-02-16 20:24:38 +11:00
|
|
|
|
|
|
|
void ED_object_vpaintmode_enter_ex(
|
2018-06-11 14:39:38 +02:00
|
|
|
struct Main *bmain, struct Depsgraph *depsgraph, struct wmWindowManager *wm,
|
2018-04-05 18:20:27 +02:00
|
|
|
struct Scene *scene, struct Object *ob);
|
2018-02-16 20:24:38 +11:00
|
|
|
void ED_object_vpaintmode_enter(struct bContext *C);
|
|
|
|
void ED_object_wpaintmode_enter_ex(
|
2018-06-11 14:39:38 +02:00
|
|
|
struct Main *bmain, struct Depsgraph *depsgraph, struct wmWindowManager *wm,
|
2018-04-05 18:20:27 +02:00
|
|
|
struct Scene *scene, struct Object *ob);
|
2018-02-16 20:24:38 +11:00
|
|
|
void ED_object_wpaintmode_enter(struct bContext *C);
|
|
|
|
|
2018-04-05 18:20:27 +02:00
|
|
|
void ED_object_vpaintmode_exit_ex(struct Object *ob);
|
2018-02-16 20:24:38 +11:00
|
|
|
void ED_object_vpaintmode_exit(struct bContext *C);
|
2018-04-05 18:20:27 +02:00
|
|
|
void ED_object_wpaintmode_exit_ex(struct Object *ob);
|
2018-02-16 20:24:38 +11:00
|
|
|
void ED_object_wpaintmode_exit(struct bContext *C);
|
|
|
|
|
2018-03-06 19:04:43 +11:00
|
|
|
void ED_object_sculptmode_enter_ex(
|
2018-06-08 14:38:57 +02:00
|
|
|
struct Main *bmain, struct Depsgraph *depsgraph,
|
2018-04-05 18:20:27 +02:00
|
|
|
struct Scene *scene, struct Object *ob,
|
2018-03-06 19:04:43 +11:00
|
|
|
struct ReportList *reports);
|
|
|
|
void ED_object_sculptmode_enter(struct bContext *C, struct ReportList *reports);
|
2018-02-16 23:37:47 +11:00
|
|
|
void ED_object_sculptmode_exit_ex(
|
2018-04-06 12:07:27 +02:00
|
|
|
struct Depsgraph *depsgraph,
|
2018-04-05 18:20:27 +02:00
|
|
|
struct Scene *scene, struct Object *ob);
|
2018-02-16 23:37:47 +11:00
|
|
|
void ED_object_sculptmode_exit(struct bContext *C);
|
|
|
|
|
2012-05-26 22:21:56 +00:00
|
|
|
void ED_object_location_from_view(struct bContext *C, float loc[3]);
|
2018-05-06 18:32:18 +02:00
|
|
|
void ED_object_rotation_from_quat(float rot[3], const float quat[4], const char align_axis);
|
2014-01-16 23:50:35 +11:00
|
|
|
void ED_object_rotation_from_view(struct bContext *C, float rot[3], const char align_axis);
|
2012-05-26 22:21:56 +00:00
|
|
|
void ED_object_base_init_transform(struct bContext *C, struct Base *base, const float loc[3], const float rot[3]);
|
2015-02-10 02:38:21 +11:00
|
|
|
float ED_object_new_primitive_matrix(
|
|
|
|
struct bContext *C, struct Object *editob,
|
|
|
|
const float loc[3], const float rot[3], float primmat[4][4]);
|
2009-12-28 04:09:46 +00:00
|
|
|
|
2015-06-21 16:06:44 +02:00
|
|
|
|
|
|
|
/* Avoid allowing too much insane values even by typing (typos can hang/crash Blender otherwise). */
|
|
|
|
#define OBJECT_ADD_SIZE_MAXF 1.0e12f
|
|
|
|
|
2013-09-16 00:18:09 +00:00
|
|
|
void ED_object_add_unit_props(struct wmOperatorType *ot);
|
|
|
|
void ED_object_add_generic_props(struct wmOperatorType *ot, bool do_editmode);
|
Fix T37879: Default UV generation for mesh primitives.
Adds default-generated UVs to mesh primitives (cone, cylinder, icosphere, uvsphere, cube, circle, grid)
when they are added to the scene, since some of them can be pretty awkward to unwrap manually.
Original patch: Liam Mitchell (CommanderCorianderSalamander).
Main review work: Campbell Barton (campbellbarton).
Finalization, fixes and cleanup: Bastien Montagne (mont29).
Reviewers: mont29, #mesh_modeling, campbellbarton
Reviewed By: mont29, campbellbarton
Subscribers: lkruel, campbellbarton, michaelknubben, kevindietrich
Maniphest Tasks: T37879
Differential Revision: https://developer.blender.org/D481
2015-12-04 23:49:55 +01:00
|
|
|
void ED_object_add_mesh_props(struct wmOperatorType *ot);
|
2014-01-16 23:50:35 +11:00
|
|
|
bool ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, const char view_align_axis,
|
|
|
|
float loc[3], float rot[3],
|
2013-09-16 00:18:09 +00:00
|
|
|
bool *enter_editmode, unsigned int *layer, bool *is_view_aligned);
|
2011-05-01 18:53:18 +00:00
|
|
|
|
2014-09-01 20:09:31 +10:00
|
|
|
struct Object *ED_object_add_type(
|
2015-05-04 12:25:33 +10:00
|
|
|
struct bContext *C,
|
|
|
|
int type, const char *name, const float loc[3], const float rot[3],
|
|
|
|
bool enter_editmode, unsigned int layer)
|
|
|
|
ATTR_NONNULL(1) ATTR_RETURNS_NONNULL;
|
2009-01-05 15:19:31 +00:00
|
|
|
|
2014-10-10 18:26:46 +02:00
|
|
|
void ED_object_single_users(struct Main *bmain, struct Scene *scene, const bool full, const bool copy_groups);
|
2013-04-24 23:09:25 +00:00
|
|
|
void ED_object_single_user(struct Main *bmain, struct Scene *scene, struct Object *ob);
|
2008-01-01 18:29:19 +00:00
|
|
|
|
2010-01-19 11:31:49 +00:00
|
|
|
/* object motion paths */
|
2016-02-26 01:07:26 +13:00
|
|
|
void ED_objects_clear_paths(struct bContext *C, bool only_selected);
|
2010-01-19 11:31:49 +00:00
|
|
|
void ED_objects_recalculate_paths(struct bContext *C, struct Scene *scene);
|
|
|
|
|
2009-01-10 19:34:23 +00:00
|
|
|
/* constraints */
|
2018-04-05 18:20:27 +02:00
|
|
|
struct ListBase *get_active_constraints(struct Object *ob);
|
2014-03-16 03:24:05 +11:00
|
|
|
struct ListBase *get_constraint_lb(struct Object *ob, struct bConstraint *con, struct bPoseChannel **r_pchan);
|
2018-04-05 18:20:27 +02:00
|
|
|
struct bConstraint *get_active_constraint(struct Object *ob);
|
2009-05-27 00:03:49 +00:00
|
|
|
|
2018-05-31 12:27:47 +02:00
|
|
|
void object_test_constraints(struct Main *bmain, struct Object *ob);
|
2009-05-27 00:03:49 +00:00
|
|
|
|
|
|
|
void ED_object_constraint_set_active(struct Object *ob, struct bConstraint *con);
|
2018-05-31 12:27:47 +02:00
|
|
|
void ED_object_constraint_update(struct Main *bmain, struct Object *ob);
|
2013-02-22 00:51:58 +00:00
|
|
|
void ED_object_constraint_dependency_update(struct Main *bmain, struct Object *ob);
|
2009-01-10 19:34:23 +00:00
|
|
|
|
2018-05-31 12:27:47 +02:00
|
|
|
void ED_object_constraint_tag_update(struct Main *bmain, struct Object *ob, struct bConstraint *con);
|
2015-03-19 18:28:49 +05:00
|
|
|
void ED_object_constraint_dependency_tag_update(struct Main *bmain, struct Object *ob, struct bConstraint *con);
|
|
|
|
|
2018-03-02 14:55:53 +11:00
|
|
|
/* object_modes.c */
|
2018-03-02 13:53:17 +11:00
|
|
|
bool ED_object_mode_compat_test(const struct Object *ob, eObjectMode mode);
|
2018-04-05 18:20:27 +02:00
|
|
|
bool ED_object_mode_compat_set(struct bContext *C, struct Object *ob, eObjectMode mode, struct ReportList *reports);
|
2018-03-02 13:53:17 +11:00
|
|
|
void ED_object_mode_toggle(struct bContext *C, eObjectMode mode);
|
2018-03-19 14:17:59 +01:00
|
|
|
void ED_object_mode_set(struct bContext *C, eObjectMode mode);
|
2018-03-02 13:53:17 +11:00
|
|
|
|
2018-03-02 14:55:53 +11:00
|
|
|
bool ED_object_mode_generic_enter(
|
2018-03-03 16:39:57 +11:00
|
|
|
struct bContext *C,
|
|
|
|
eObjectMode object_mode);
|
2018-03-02 14:55:53 +11:00
|
|
|
void ED_object_mode_generic_exit(
|
2018-05-30 15:21:26 +02:00
|
|
|
struct Main *bmain,
|
2018-04-06 12:07:27 +02:00
|
|
|
struct Depsgraph *depsgraph,
|
2018-04-05 18:20:27 +02:00
|
|
|
struct Scene *scene, struct Object *ob);
|
2018-03-02 14:55:53 +11:00
|
|
|
bool ED_object_mode_generic_has_data(
|
2018-04-06 12:07:27 +02:00
|
|
|
struct Depsgraph *depsgraph,
|
2018-03-02 14:55:53 +11:00
|
|
|
struct Object *ob);
|
|
|
|
|
2018-03-03 16:39:57 +11:00
|
|
|
bool ED_object_mode_generic_exists(
|
|
|
|
struct wmWindowManager *wm, struct Object *ob,
|
|
|
|
eObjectMode object_mode);
|
|
|
|
|
2009-05-21 15:34:09 +00:00
|
|
|
/* object_modifier.c */
|
2009-11-22 13:44:09 +00:00
|
|
|
enum {
|
2012-05-12 20:39:39 +00:00
|
|
|
MODIFIER_APPLY_DATA = 1,
|
2011-09-10 09:38:38 +00:00
|
|
|
MODIFIER_APPLY_SHAPE
|
|
|
|
};
|
2009-11-22 13:44:09 +00:00
|
|
|
|
2018-02-19 12:20:18 +11:00
|
|
|
struct ModifierData *ED_object_modifier_add(
|
|
|
|
struct ReportList *reports, struct Main *bmain, struct Scene *scene,
|
|
|
|
struct Object *ob, const char *name, int type);
|
2014-02-01 01:45:09 +11:00
|
|
|
bool ED_object_modifier_remove(struct ReportList *reports, struct Main *bmain,
|
|
|
|
struct Object *ob, struct ModifierData *md);
|
2013-02-22 00:51:58 +00:00
|
|
|
void ED_object_modifier_clear(struct Main *bmain, struct Object *ob);
|
2009-05-21 15:34:09 +00:00
|
|
|
int ED_object_modifier_move_down(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
|
|
|
|
int ED_object_modifier_move_up(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
|
2018-02-19 12:20:18 +11:00
|
|
|
int ED_object_modifier_convert(
|
|
|
|
struct ReportList *reports, struct Main *bmain, struct Scene *scene,
|
2018-05-30 08:49:34 +02:00
|
|
|
struct ViewLayer *view_layer, struct Object *ob, struct ModifierData *md);
|
|
|
|
int ED_object_modifier_apply(
|
|
|
|
struct ReportList *reports, struct Depsgraph *depsgraph, struct Scene *scene,
|
|
|
|
struct Object *ob, struct ModifierData *md, int mode);
|
2009-05-21 15:34:09 +00:00
|
|
|
int ED_object_modifier_copy(struct ReportList *reports, struct Object *ob, struct ModifierData *md);
|
2009-01-10 19:34:23 +00:00
|
|
|
|
2018-02-06 17:57:07 +11:00
|
|
|
bool ED_object_iter_other(
|
2018-04-05 18:20:27 +02:00
|
|
|
struct Main *bmain, struct Object *orig_ob, const bool include_orig,
|
|
|
|
bool (*callback)(struct Object *ob, void *callback_data),
|
2018-02-06 17:57:07 +11:00
|
|
|
void *callback_data);
|
2012-06-24 20:18:32 +00:00
|
|
|
|
2018-04-05 18:20:27 +02:00
|
|
|
bool ED_object_multires_update_totlevels_cb(struct Object *ob, void *totlevel_v);
|
2012-06-24 20:18:32 +00:00
|
|
|
|
2012-10-10 03:13:02 +00:00
|
|
|
/* object_select.c */
|
2012-07-25 19:45:34 +00:00
|
|
|
void ED_object_select_linked_by_id(struct bContext *C, struct ID *id);
|
|
|
|
|
2017-10-18 15:07:26 +11:00
|
|
|
const struct EnumPropertyItem *ED_object_vgroup_selection_itemf_helper(
|
2013-06-23 15:37:08 +00:00
|
|
|
const struct bContext *C,
|
|
|
|
struct PointerRNA *ptr,
|
|
|
|
struct PropertyRNA *prop,
|
2014-01-04 18:08:43 +11:00
|
|
|
bool *r_free,
|
2013-06-23 15:37:08 +00:00
|
|
|
const unsigned int selection_mask);
|
2013-06-12 09:52:37 +00:00
|
|
|
|
2018-02-19 12:20:18 +11:00
|
|
|
void ED_object_check_force_modifiers(
|
|
|
|
struct Main *bmain, struct Scene *scene, struct Object *object);
|
2013-11-19 17:19:06 +06:00
|
|
|
|
2017-05-31 01:31:14 +10:00
|
|
|
/* object_facemap_ops.c */
|
|
|
|
void ED_object_facemap_face_add(struct Object *ob, struct bFaceMap *fmap, int facenum);
|
|
|
|
void ED_object_facemap_face_remove(struct Object *ob, struct bFaceMap *fmap, int facenum);
|
|
|
|
|
2010-10-05 00:05:14 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-05-30 15:24:45 +02:00
|
|
|
/* Don't allow switching object-modes when selecting objects. */
|
|
|
|
#define USE_OBJECT_MODE_STRICT
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __ED_OBJECT_H__ */
|