28#include "RNA_prototypes.hh"
64 if (object->pose !=
nullptr) {
90 operation_name_tag(-1)
102 : depsgraph_(
depsgraph), builder_(builder)
122 if (comp_node ==
nullptr) {
135 const char *substr = strstr(prop_identifier, rna_path_component);
136 if (substr ==
nullptr) {
142 const bool start_ok = substr == prop_identifier || substr[-1] ==
'.';
147 const size_t component_len = strlen(rna_path_component);
148 const bool end_ok =
ELEM(substr[component_len],
'\0',
'.',
'[');
158 return node_identifier;
180 return node_identifier;
182 if (
ptr->
type == &RNA_PoseBone) {
188 if (prop !=
nullptr) {
201 else if (
STR_ELEM(prop_name,
"head",
"tail",
"length") ||
STRPREFIX(prop_name,
"matrix")) {
211 return node_identifier;
223 node_identifier.
id = (
ID *)((
Object *)node_identifier.
id)->data;
225 return node_identifier;
240 if (pchan ==
nullptr) {
249 return node_identifier;
251 if (
ELEM(
ptr->
type, &RNA_ConstraintTarget, &RNA_ConstraintTargetBone)) {
257 if (con !=
nullptr) {
258 if (pchan !=
nullptr) {
267 return node_identifier;
271 (contains(prop_identifier,
"show_viewport") ||
272 contains(prop_identifier,
"show_render")))
276 return node_identifier;
299 return node_identifier;
301 else if (
ptr->
type == &RNA_Object) {
303 if (prop !=
nullptr) {
305 if (
contains(prop_identifier,
"location") ||
contains(prop_identifier,
"matrix_basis") ||
306 contains(prop_identifier,
"matrix_channel") ||
307 contains(prop_identifier,
"matrix_inverse") ||
308 contains(prop_identifier,
"matrix_local") ||
309 contains(prop_identifier,
"matrix_parent_inverse") ||
310 contains(prop_identifier,
"matrix_world") ||
311 contains(prop_identifier,
"rotation_axis_angle") ||
312 contains(prop_identifier,
"rotation_euler") ||
313 contains(prop_identifier,
"rotation_mode") ||
314 contains(prop_identifier,
"rotation_quaternion") ||
contains(prop_identifier,
"scale") ||
315 contains(prop_identifier,
"delta_location") ||
316 contains(prop_identifier,
"delta_rotation_euler") ||
317 contains(prop_identifier,
"delta_rotation_quaternion") ||
318 contains(prop_identifier,
"delta_scale"))
321 return node_identifier;
323 if (
contains(prop_identifier,
"data")) {
327 return node_identifier;
329 if (
STR_ELEM(prop_identifier,
"hide_viewport",
"hide_render")) {
331 return node_identifier;
333 if (
STREQ(prop_identifier,
"dimensions")) {
336 return node_identifier;
340 else if (
ptr->
type == &RNA_ShapeKey) {
346 return node_identifier;
348 else if (
ptr->
type == &RNA_Key) {
351 return node_identifier;
356 return node_identifier;
360 return node_identifier;
364 return node_identifier;
366 else if (
ELEM(
ptr->
type, &RNA_Curve, &RNA_TextCurve)) {
369 return node_identifier;
371 else if (
ELEM(
ptr->
type, &RNA_BezierSplinePoint, &RNA_SplinePoint)) {
374 return node_identifier;
380 return node_identifier;
383 else if (
ELEM(
ptr->
type, &RNA_MeshVertex, &RNA_MeshEdge, &RNA_MeshLoop, &RNA_MeshPolygon)) {
385 return node_identifier;
387 if (prop !=
nullptr) {
393 return node_identifier;
395 return node_identifier;
400 unique_ptr<RNANodeQueryIDData> &id_data =
id_data_map_.lookup_or_add_cb(
401 id, [&]() {
return std::make_unique<RNANodeQueryIDData>(
id); });
402 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.
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)
bool RNA_property_is_idprop(const PropertyRNA *prop)
const char * RNA_property_identifier(const PropertyRNA *prop)
OperationNode * find_operation(OperationIDKey key) const
IDNode * find_id_node(const ID *id) const