Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-02-14 17:46:01 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-02-14 20:21:46 +0300
commit1ff3d5bc9ab7b296b1c60038d45ef4c030403162 (patch)
treeccda1f1d1913aab4268a03699944a11f578b5c4b /source/blender/editors
parentb9762fed932b7f508aec5650fd80679cf635d677 (diff)
Layer Macros: create the instance as part of the macro
Instead of pre-initializing an instance prior to the macro, we do it as part of the macro itself now.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_add.c1
-rw-r--r--source/blender/editors/object/object_relations.c4
-rw-r--r--source/blender/editors/screen/screen_context.c5
-rw-r--r--source/blender/editors/space_clip/tracking_ops_orient.c1
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c7
5 files changed, 1 insertions, 17 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index e7223f6f1ee..97db8458d08 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1876,7 +1876,6 @@ static int convert_exec(bContext *C, wmOperator *op)
if (!keep_original) {
if (mballConverted) {
- Object *ob_mball;
FOREACH_SCENE_OBJECT(scene, ob_mball)
{
if (ob->type == OB_MBALL) {
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index c79c702837a..10439d49787 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1728,7 +1728,6 @@ static void single_object_users(Main *bmain, Scene *scene, View3D *v3d, const in
* button can be functional.*/
void ED_object_single_user(Main *bmain, Scene *scene, Object *ob)
{
- Object *ob_iter;
FOREACH_SCENE_OBJECT(scene, ob_iter)
{
ob_iter->flag &= ~OB_DONE;
@@ -1855,8 +1854,6 @@ static void single_obdata_users(Main *bmain, Scene *scene, const int flag)
static void single_object_action_users(Scene *scene, SceneLayer *sl, const int flag)
{
- Object *ob;
-
FOREACH_OBJECT_FLAG(scene, sl, flag, ob)
if (!ID_IS_LINKED_DATABLOCK(ob)) {
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
@@ -1871,7 +1868,6 @@ static void single_mat_users(Main *bmain, Scene *scene, SceneLayer *sl, const in
Tex *tex;
int a, b;
- Object *ob;
FOREACH_OBJECT_FLAG(scene, sl, flag, ob)
if (!ID_IS_LINKED_DATABLOCK(ob)) {
for (a = 1; a <= ob->totcol; a++) {
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index c82a210725c..0448fba78e6 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -97,7 +97,6 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
else if (CTX_data_equals(member, "visible_objects")) {
- Object *ob;
FOREACH_VISIBLE_OBJECT(sl, ob)
{
CTX_data_id_list_add(result, &ob->id);
@@ -116,7 +115,6 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
else if (CTX_data_equals(member, "selected_objects")) {
- Object *ob;
FOREACH_SELECTED_OBJECT(sl, ob)
{
CTX_data_id_list_add(result, &ob->id);
@@ -126,7 +124,6 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
else if (CTX_data_equals(member, "selected_editable_objects")) {
- Object *ob;
FOREACH_SELECTED_OBJECT(sl, ob)
{
if (0 == BKE_object_is_libdata(ob)) {
@@ -139,7 +136,6 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
else if (CTX_data_equals(member, "editable_objects")) {
/* Visible + Editable, but not necessarily selected */
- Object *ob;
FOREACH_VISIBLE_OBJECT(sl, ob)
{
if (0 == BKE_object_is_libdata(ob)) {
@@ -151,7 +147,6 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
return 1;
}
else if ( CTX_data_equals(member, "visible_bases")) {
- Base *base;
FOREACH_VISIBLE_BASE(sl, base)
{
CTX_data_list_add(result, &scene->id, &RNA_ObjectBase, base);
diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c
index 12b97504dc7..7b44e9317ba 100644
--- a/source/blender/editors/space_clip/tracking_ops_orient.c
+++ b/source/blender/editors/space_clip/tracking_ops_orient.c
@@ -70,7 +70,6 @@ static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip)
return camera;
}
- Object *ob;
FOREACH_SCENE_OBJECT(scene, ob)
{
if (ob->type == OB_CAMERA) {
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index d296a54d5d4..1ba33970aad 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1724,7 +1724,6 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops
if (sce == scene && show_opened)
tselem->flag &= ~TSE_CLOSED;
- Object *ob;
FOREACH_SCENE_OBJECT(scene, ob)
{
ten = outliner_add_element(soops, &te->subtree, ob, te, 0, 0);
@@ -1745,7 +1744,6 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops
outliner_add_scene_contents(soops, &soops->tree, scene, NULL);
- Object *ob;
FOREACH_SCENE_OBJECT(scene, ob)
{
ten = outliner_add_element(soops, &soops->tree, ob, NULL, 0, 0);
@@ -1754,7 +1752,6 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops
outliner_make_hierarchy(&soops->tree);
}
else if (soops->outlinevis == SO_VISIBLE) {
- Object *ob;
FOREACH_VISIBLE_OBJECT(sl, ob)
{
outliner_add_element(soops, &soops->tree, ob, NULL, 0, 0);
@@ -1782,7 +1779,6 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops
else if (soops->outlinevis == SO_SAME_TYPE) {
Object *ob_active = OBACT_NEW;
if (ob_active) {
- Object *ob;
FOREACH_SCENE_OBJECT(scene, ob)
{
if (ob->type == ob_active->type) {
@@ -1794,10 +1790,9 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SceneLayer *sl, SpaceOops
}
}
else if (soops->outlinevis == SO_SELECTED) {
- Object *ob;
FOREACH_SELECTED_OBJECT(sl, ob)
{
- ten = outliner_add_element(soops, &soops->tree, ob, NULL, 0, 0);
+ ten = outliner_add_element(soops, &soops->tree, ob, NULL, 0, 0);
}
FOREACH_SELECTED_OBJECT_END
outliner_make_hierarchy(&soops->tree);