Merge branch 'blender2.7'
This commit is contained in:
commit
1d365374e8
@ -25,16 +25,16 @@
|
||||
# Windows and macOS, and install_deps.sh on Linux.
|
||||
#
|
||||
# WINDOWS USAGE:
|
||||
# Don't call this cmake file your self, use build_deps.cmd
|
||||
# Don't call this cmake file yourself, use build_deps.cmd
|
||||
# build_deps 2013 x64 / build_deps 2013 x86
|
||||
# build_deps 2015 x64 / build_deps 2015 x86
|
||||
#
|
||||
# MAC OS X USAGE:
|
||||
# Install with homebrew: brew install autoconf automake libtool yasm nasm
|
||||
# Install with homebrew: brew install cmake autoconf automake libtool yasm nasm
|
||||
# Run "make deps" from main Blender directory
|
||||
#
|
||||
# LINUX USAGE:
|
||||
# Install compiler, cmake, autoconf, automake, libtool, yasm
|
||||
# Install compiler cmake autoconf automake libtool yasm nasm tcl
|
||||
# Run "make deps" from main Blender directory
|
||||
#
|
||||
####################################################################################################
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "DNA_cachefile_types.h"
|
||||
#include "DNA_constraint_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
@ -50,8 +51,10 @@
|
||||
#include "BLF_api.h"
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_colorband.h"
|
||||
#include "BKE_colortools.h"
|
||||
#include "BKE_constraint.h"
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_gpencil_modifier.h"
|
||||
@ -1938,55 +1941,6 @@ void uiTemplateOperatorRedoProperties(uiLayout *layout, const bContext *C)
|
||||
|
||||
/************************ Constraint Template *************************/
|
||||
|
||||
#include "DNA_constraint_types.h"
|
||||
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_constraint.h"
|
||||
|
||||
#define B_CONSTRAINT_TEST 5
|
||||
// #define B_CONSTRAINT_CHANGETARGET 6
|
||||
|
||||
static void do_constraint_panels(bContext *C, void *ob_pt, int event)
|
||||
{
|
||||
Object *ob = (Object *)ob_pt;
|
||||
|
||||
switch (event) {
|
||||
case B_CONSTRAINT_TEST:
|
||||
break; /* no handling */
|
||||
#if 0 /* UNUSED */
|
||||
case B_CONSTRAINT_CHANGETARGET:
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
if (ob->pose) {
|
||||
BKE_pose_tag_recalc(bmain, ob->pose); /* checks & sorts pose channels */
|
||||
}
|
||||
DEG_relations_tag_update(bmain);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
/* note: RNA updates now call this, commenting else it gets called twice.
|
||||
* if there are problems because of this, then rna needs changed update functions. */
|
||||
#if 0
|
||||
object_test_constraints(ob);
|
||||
if (ob->pose) {
|
||||
BKE_pose_update_constraint_flags(ob->pose);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ob->type == OB_ARMATURE) {
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_TRANSFORM);
|
||||
}
|
||||
else {
|
||||
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob);
|
||||
}
|
||||
|
||||
static void constraint_active_func(bContext *UNUSED(C), void *ob_v, void *con_v)
|
||||
{
|
||||
ED_object_constraint_set_active(ob_v, con_v);
|
||||
@ -2024,7 +1978,6 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
|
||||
|
||||
/* unless button has own callback, it adds this callback to button */
|
||||
block = uiLayoutGetBlock(layout);
|
||||
UI_block_func_handle_set(block, do_constraint_panels, ob);
|
||||
UI_block_func_set(block, constraint_active_func, ob, con);
|
||||
|
||||
RNA_pointer_create(&ob->id, &RNA_Constraint, con, &ptr);
|
||||
@ -2044,7 +1997,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
|
||||
UI_block_emboss_set(block, UI_EMBOSS);
|
||||
|
||||
/* name */
|
||||
uiDefBut(block, UI_BTYPE_LABEL, B_CONSTRAINT_TEST, typestr,
|
||||
uiDefBut(block, UI_BTYPE_LABEL, 0, typestr,
|
||||
xco + 0.5f * UI_UNIT_X, yco, 5 * UI_UNIT_X, 0.9f * UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "");
|
||||
|
||||
if (con->flag & CONSTRAINT_DISABLE) {
|
||||
@ -2066,9 +2019,9 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
|
||||
|
||||
/* draw a ghost icon (for proxy) and also a lock beside it,
|
||||
* to show that constraint is "proxy locked" */
|
||||
uiDefIconBut(block, UI_BTYPE_BUT, B_CONSTRAINT_TEST, ICON_GHOST_ENABLED, xco + 12.2f * UI_UNIT_X, yco, 0.95f * UI_UNIT_X, 0.95f * UI_UNIT_Y,
|
||||
uiDefIconBut(block, UI_BTYPE_BUT, 0, ICON_GHOST_ENABLED, xco + 12.2f * UI_UNIT_X, yco, 0.95f * UI_UNIT_X, 0.95f * UI_UNIT_Y,
|
||||
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Proxy Protected"));
|
||||
uiDefIconBut(block, UI_BTYPE_BUT, B_CONSTRAINT_TEST, ICON_LOCKED, xco + 13.1f * UI_UNIT_X, yco, 0.95f * UI_UNIT_X, 0.95f * UI_UNIT_Y,
|
||||
uiDefIconBut(block, UI_BTYPE_BUT, 0, ICON_LOCKED, xco + 13.1f * UI_UNIT_X, yco, 0.95f * UI_UNIT_X, 0.95f * UI_UNIT_Y,
|
||||
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Proxy Protected"));
|
||||
|
||||
UI_block_emboss_set(block, UI_EMBOSS);
|
||||
|
@ -2656,9 +2656,10 @@ void RNA_def_constraint(BlenderRNA *brna)
|
||||
/* TODO: setting this to true must ensure that all others in stack are turned off too... */
|
||||
prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_ACTIVE);
|
||||
RNA_def_property_ui_text(prop, "Active", "Constraint is the one being edited ");
|
||||
RNA_def_property_ui_text(prop, "Active", "Constraint is the one being edited");
|
||||
|
||||
prop = RNA_def_property(srna, "is_proxy_local", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_PROXY_LOCAL);
|
||||
RNA_def_property_ui_text(prop, "Proxy Local",
|
||||
"Constraint was added in this proxy instance (i.e. did not belong to source Armature)");
|
||||
|
Loading…
Reference in New Issue
Block a user