27 #include "RNA_prototypes.h"
65 if (object->
pose !=
nullptr) {
91 operation_name_tag(-1)
103 : depsgraph_(
depsgraph), builder_(builder)
123 if (comp_node ==
nullptr) {
136 const char *substr = strstr(prop_identifier, rna_path_component);
137 if (substr ==
nullptr) {
143 const bool start_ok = substr == prop_identifier || substr[-1] ==
'.';
148 const size_t component_len = strlen(rna_path_component);
149 const bool end_ok =
ELEM(substr[component_len],
'\0',
'.',
'[');
159 return node_identifier;
181 return node_identifier;
183 if (
ptr->
type == &RNA_PoseBone) {
189 if (prop !=
nullptr) {
202 else if (
STR_ELEM(prop_name,
"head",
"tail",
"length") ||
STRPREFIX(prop_name,
"matrix")) {
212 return node_identifier;
226 return node_identifier;
237 if (pchan ==
nullptr) {
246 return node_identifier;
248 if (
ELEM(
ptr->
type, &RNA_ConstraintTarget, &RNA_ConstraintTargetBone)) {
254 if (con !=
nullptr) {
255 if (pchan !=
nullptr) {
264 return node_identifier;
288 return node_identifier;
290 else if (
ptr->
type == &RNA_Object) {
292 if (prop !=
nullptr) {
295 if (
contains(prop_identifier,
"location") ||
contains(prop_identifier,
"matrix_basis") ||
296 contains(prop_identifier,
"matrix_channel") ||
297 contains(prop_identifier,
"matrix_inverse") ||
298 contains(prop_identifier,
"matrix_local") ||
299 contains(prop_identifier,
"matrix_parent_inverse") ||
300 contains(prop_identifier,
"matrix_world") ||
301 contains(prop_identifier,
"rotation_axis_angle") ||
302 contains(prop_identifier,
"rotation_euler") ||
303 contains(prop_identifier,
"rotation_mode") ||
304 contains(prop_identifier,
"rotation_quaternion") ||
contains(prop_identifier,
"scale") ||
305 contains(prop_identifier,
"delta_location") ||
306 contains(prop_identifier,
"delta_rotation_euler") ||
307 contains(prop_identifier,
"delta_rotation_quaternion") ||
308 contains(prop_identifier,
"delta_scale")) {
310 return node_identifier;
312 if (
contains(prop_identifier,
"data")) {
316 return node_identifier;
318 if (
STR_ELEM(prop_identifier,
"hide_viewport",
"hide_render")) {
320 return node_identifier;
322 if (
STREQ(prop_identifier,
"dimensions")) {
325 return node_identifier;
329 else if (
ptr->
type == &RNA_ShapeKey) {
335 return node_identifier;
337 else if (
ptr->
type == &RNA_Key) {
340 return node_identifier;
345 return node_identifier;
349 return node_identifier;
353 return node_identifier;
355 else if (
ELEM(
ptr->
type, &RNA_Curve, &RNA_TextCurve)) {
358 return node_identifier;
360 else if (
ELEM(
ptr->
type, &RNA_BezierSplinePoint, &RNA_SplinePoint)) {
363 return node_identifier;
369 return node_identifier;
372 else if (
ELEM(
ptr->
type, &RNA_MeshVertex, &RNA_MeshEdge, &RNA_MeshLoop, &RNA_MeshPolygon)) {
374 return node_identifier;
376 if (prop !=
nullptr) {
382 return node_identifier;
384 return node_identifier;
389 unique_ptr<RNANodeQueryIDData> &id_data =
id_data_map_.lookup_or_add_cb(
390 id, [&]() {
return std::make_unique<RNANodeQueryIDData>(
id); });
391 return id_data.get();
struct bConstraint * BKE_constraint_find_from_target(struct Object *ob, struct bConstraintTarget *tgt, struct bPoseChannel **r_pchan)
#define LISTBASE_FOREACH(type, var, list)
Object is a sort of wrapper for general info.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
Value lookup_default(const Key &key, const Value &default_value) const
void add_new(const Key &key, const Value &value)
virtual bool check_pchan_has_bbone_segments(const Object *object, const bPoseChannel *pchan)
OperationCode operation_code
const char * operation_name
const char * component_name
const bPoseChannel * get_pchan_for_constraint(const bConstraint *constraint)
RNANodeQueryIDData(const ID *id)
void ensure_constraint_to_pchan_map()
Map< const bConstraint *, const bPoseChannel * > * constraint_to_pchan_map_
Node * find_node(const PointerRNA *ptr, const PropertyRNA *prop, RNAPointerSource source)
RNANodeIdentifier construct_node_identifier(const PointerRNA *ptr, const PropertyRNA *prop, RNAPointerSource source)
static bool contains(const char *prop_identifier, const char *rna_path_component)
DepsgraphBuilder * builder_
RNANodeQuery(Depsgraph *depsgraph, DepsgraphBuilder *builder)
RNANodeQueryIDData * ensure_id_data(const ID *id)
Map< const ID *, unique_ptr< RNANodeQueryIDData > > id_data_map_
const Depsgraph * depsgraph
bool rna_prop_affects_parameters_node(const PointerRNA *ptr, const PropertyRNA *prop)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
const char * RNA_property_identifier(const PropertyRNA *prop)
bool RNA_property_is_idprop(const PropertyRNA *prop)
OperationNode * find_operation(OperationIDKey key) const
IDNode * find_id_node(const ID *id) const