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:
authorCampbell Barton <ideasman42@gmail.com>2007-11-27 22:23:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-11-27 22:23:26 +0300
commit044b78c83b0f9e0503d8077edc4d235ffcb97e85 (patch)
tree83a15f5338a1779a6c6c7c10ae6cb24d322f7153 /source/blender
parent3da97e27c6cb5e1d2a5e93c795b58d88f22196df (diff)
new function object_is_libdata - checks ob->id.lib but also accounts for proxy's.
Object panels were using object_data_is_libdata, which meant linked obdata could not have object settings changed. curve2tree - option to face leaves up or down - random pitch and roll options - place 2 leaves on a point for denser leaves - random seed entry so you can get reproducible results
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/include/BDR_editobject.h1
-rw-r--r--source/blender/src/buttons_object.c8
-rw-r--r--source/blender/src/drawview.c2
-rw-r--r--source/blender/src/editobject.c12
4 files changed, 18 insertions, 5 deletions
diff --git a/source/blender/include/BDR_editobject.h b/source/blender/include/BDR_editobject.h
index 2fb0ad5aa88..51638b258b3 100644
--- a/source/blender/include/BDR_editobject.h
+++ b/source/blender/include/BDR_editobject.h
@@ -119,6 +119,7 @@ void add_hook(void);
void hook_select(struct HookModifierData *hmd);
int hook_getIndexArray(int *tot, int **indexar, char *name, float *cent_r);
+int object_is_libdata(struct Object *ob);
int object_data_is_libdata(struct Object *ob);
void hide_objects(int select);
void show_objects(void);
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c
index 731fe49e4c9..aa30682c9e5 100644
--- a/source/blender/src/buttons_object.c
+++ b/source/blender/src/buttons_object.c
@@ -2318,7 +2318,7 @@ static void object_panel_object(Object *ob)
block= uiNewBlock(&curarea->uiblocks, "object_panel_object", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Object and Links", "Object", 0, 0, 318, 204)==0) return;
- uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+ uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
/* object name */
uiBlockSetCol(block, TH_BUT_SETTING2);
@@ -2385,7 +2385,7 @@ static void object_panel_anim(Object *ob)
block= uiNewBlock(&curarea->uiblocks, "object_panel_anim", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Anim settings", "Object", 320, 0, 318, 204)==0) return;
- uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+ uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
uiBlockBeginAlign(block);
uiDefButS(block, ROW,B_TRACKBUTS,"TrackX", 24,180,59,19, &ob->trackflag, 12.0, 0.0, 0, 0, "Specify the axis that points to another object");
@@ -2450,7 +2450,7 @@ static void object_panel_draw(Object *ob)
block= uiNewBlock(&curarea->uiblocks, "object_panel_draw", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Draw", "Object", 640, 0, 318, 204)==0) return;
- uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+ uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
/* LAYERS */
xco= 120;
@@ -2512,7 +2512,7 @@ void object_panel_constraint(char *context)
block= uiNewBlock(&curarea->uiblocks, "object_panel_constraint", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Constraints", context, 960, 0, 318, 204)==0) return;
- uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+ uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
/* this is a variable height panel, newpanel doesnt force new size on existing panels */
/* so first we make it default height */
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index c00c3ddf157..14690b08d48 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -2258,7 +2258,7 @@ static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT
return;
}
- uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
+ uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
if(G.f & (G_VERTEXPAINT|G_TEXTUREPAINT|G_WEIGHTPAINT)) {
uiBlockSetFlag(block, UI_BLOCK_FRONTBUFFER); // force old style frontbuffer draw
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 995606282c3..8f40742852e 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -5485,6 +5485,18 @@ void hookmenu(void)
}
/*
+ * Returns true if the Object is a from an external blend file (libdata)
+ */
+int object_is_libdata(Object *ob)
+{
+ if (!ob) return 0;
+ if (ob->proxy) return 0;
+ if (ob->id.lib) return 1;
+ return 0;
+}
+
+
+/*
* Returns true if the Object data is a from an external blend file (libdata)
*/
int object_data_is_libdata(Object *ob)