25#include "RNA_prototypes.hh"
61 if (object->
pose !=
nullptr) {
87 operation_name_tag(-1)
99 : depsgraph_(
depsgraph), builder_(builder)
119 if (comp_node ==
nullptr) {
132 const char *substr = strstr(prop_identifier, rna_path_component);
133 if (substr ==
nullptr) {
139 const bool start_ok = substr == prop_identifier || substr[-1] ==
'.';
144 const size_t component_len = strlen(rna_path_component);
145 const bool end_ok =
ELEM(substr[component_len],
'\0',
'.',
'[');
155 return node_identifier;
176 return node_identifier;
178 if (
ptr->
type == &RNA_PoseBone) {
184 if (prop !=
nullptr) {
197 else if (
STR_ELEM(prop_name,
"head",
"tail",
"length") ||
STRPREFIX(prop_name,
"matrix")) {
207 return node_identifier;
221 return node_identifier;
236 if (pchan ==
nullptr) {
245 return node_identifier;
247 if (
ELEM(
ptr->
type, &RNA_ConstraintTarget, &RNA_ConstraintTargetBone)) {
253 if (con !=
nullptr) {
254 if (pchan !=
nullptr) {
263 return node_identifier;
267 (
contains(prop_identifier,
"show_viewport") ||
268 contains(prop_identifier,
"show_render")))
272 return node_identifier;
295 return node_identifier;
297 else if (
ptr->
type == &RNA_Object) {
299 if (prop !=
nullptr) {
301 if (
contains(prop_identifier,
"location") ||
contains(prop_identifier,
"matrix_basis") ||
302 contains(prop_identifier,
"matrix_channel") ||
303 contains(prop_identifier,
"matrix_inverse") ||
304 contains(prop_identifier,
"matrix_local") ||
305 contains(prop_identifier,
"matrix_parent_inverse") ||
306 contains(prop_identifier,
"matrix_world") ||
307 contains(prop_identifier,
"rotation_axis_angle") ||
308 contains(prop_identifier,
"rotation_euler") ||
309 contains(prop_identifier,
"rotation_mode") ||
310 contains(prop_identifier,
"rotation_quaternion") ||
contains(prop_identifier,
"scale") ||
311 contains(prop_identifier,
"delta_location") ||
312 contains(prop_identifier,
"delta_rotation_euler") ||
313 contains(prop_identifier,
"delta_rotation_quaternion") ||
314 contains(prop_identifier,
"delta_scale"))
317 return node_identifier;
319 if (
contains(prop_identifier,
"data")) {
323 return node_identifier;
325 if (
STR_ELEM(prop_identifier,
"hide_viewport",
"hide_render")) {
327 return node_identifier;
329 if (
STREQ(prop_identifier,
"dimensions")) {
332 return node_identifier;
336 else if (
ptr->
type == &RNA_ShapeKey) {
342 return node_identifier;
344 else if (
ptr->
type == &RNA_Key) {
347 return node_identifier;
352 return node_identifier;
356 return node_identifier;
360 return node_identifier;
362 else if (
ELEM(
ptr->
type, &RNA_Curve, &RNA_TextCurve)) {
365 return node_identifier;
367 else if (
ELEM(
ptr->
type, &RNA_BezierSplinePoint, &RNA_SplinePoint)) {
370 return node_identifier;
376 return node_identifier;
379 else if (
ELEM(
ptr->
type, &RNA_MeshVertex, &RNA_MeshEdge, &RNA_MeshLoop, &RNA_MeshPolygon)) {
381 return node_identifier;
383 if (prop !=
nullptr) {
389 return node_identifier;
391 return node_identifier;
396 std::unique_ptr<RNANodeQueryIDData> &id_data =
id_data_map_.lookup_or_add_cb(
397 id, [&]() {
return std::make_unique<RNANodeQueryIDData>(
id); });
398 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.
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)
Map< const ID *, std::unique_ptr< RNANodeQueryIDData > > id_data_map_
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)
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