From f3181bf684e7cb06712ed2cc9cd9cf29d4eb9b89 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 31 Mar 2021 17:26:06 +0200 Subject: [PATCH 1/3] Update version number on release/1.10.x branch to 1.10.10 --- dtool/PandaVersion.pp | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dtool/PandaVersion.pp b/dtool/PandaVersion.pp index 32dc333ceb..db041fd61f 100644 --- a/dtool/PandaVersion.pp +++ b/dtool/PandaVersion.pp @@ -7,7 +7,7 @@ // place to put this. // Use spaces to separate the major, minor, and sequence numbers here. -#define PANDA_VERSION 1 10 9 +#define PANDA_VERSION 1 10 10 // This variable will be defined to false in the CVS repository, but // scripts that generate source tarballs and/or binary releases for diff --git a/setup.cfg b/setup.cfg index c58ab3cb34..c3e6552be1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = Panda3D -version = 1.10.9 +version = 1.10.10 url = https://www.panda3d.org/ description = Panda3D is a framework for 3D rendering and game development for Python and C++ programs. license = Modified BSD License From fa73657d032d47013e8fcc4283b78dcd1b74dc34 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 31 Mar 2021 17:26:40 +0200 Subject: [PATCH 2/3] pgui: Revert part of f2e488fd6b39a6fca54c0be79378955157a266de This caused a regression due to a removal of update_frame invocation in single-threaded pipeline, needs to be revisited later on master branch --- panda/src/pgui/pgItem.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/panda/src/pgui/pgItem.cxx b/panda/src/pgui/pgItem.cxx index 74201d01b0..1ad3441a63 100644 --- a/panda/src/pgui/pgItem.cxx +++ b/panda/src/pgui/pgItem.cxx @@ -1006,13 +1006,10 @@ get_frame_style(int state) { void PGItem:: set_frame_style(int state, const PGFrameStyle &style) { LightReMutexHolder holder(_lock); - - slot_state_def(state); - - if (_state_defs[state]._root.is_empty()) { - // Create a new node. - _state_defs[state]._root = NodePath("state_" + format_string(state)); - } + // Get the state def node, mainly to ensure that this state is slotted and + // listed as having been defined. + NodePath &root = do_get_state_def(state); + nassertv(!root.is_empty()); _state_defs[state]._frame_style = style; _state_defs[state]._frame_stale = true; From 73a2d29c39dee1bf5051b1e349964eafaaa155cb Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 31 Mar 2021 17:46:37 +0300 Subject: [PATCH 3/3] maya: Allow more than three eggObjectTypes in a Maya model Closes #1134 --- pandatool/src/maya/eggObjectFlags.mel | 50 ++++++++------------------ pandatool/src/mayaegg/mayaNodeTree.cxx | 24 +++++++++---- 2 files changed, 32 insertions(+), 42 deletions(-) diff --git a/pandatool/src/maya/eggObjectFlags.mel b/pandatool/src/maya/eggObjectFlags.mel index 696ee5dff6..7ad070d7fd 100644 --- a/pandatool/src/maya/eggObjectFlags.mel +++ b/pandatool/src/maya/eggObjectFlags.mel @@ -1,6 +1,6 @@ // -// This is a sample mel script to flag a Maya node with one, two, or -// three eggObjectTypes* attributes. These attributes are used to tag +// This is a sample mel script to flag a Maya node with at least +// one eggObjectTypes* attribute. These attributes are used to tag // geometry with special meaning to Panda. There are a handful of // attribute values that are predefined within Panda, but you can also // make up your own attribute values, and define an arbitrary egg @@ -28,42 +28,22 @@ // direct/src/configfiles/direct.prc.pp for examples of this. // -global proc eggObjectFlags() -{ -string $sel[] =`ls -sl`; -for ($i in $sel) - { - string $attrName = "eggObjectTypes"; +global proc eggObjectFlags() { + string $sel[] =`ls -sl`; // Modify this line as needed to add your own object types. string $eggFlags = "none:portal:polylight:seq24:seq12:indexed:model:dcs:barrier:sphere:tube:trigger:trigger-sphere:bubble:ghost:keep-all-uvsets"; - - string $object = ($i + ".eggObjectTypes"); - - if( `objExists ($object + "1")` ) - { - - if( `objExists ($object + "2")` ) - { - - if( `objExists ($object + "3")` ) - { - warning("No More Egg Object Types Supported"); - } - else - { - addAttr -ln ($attrName + "3") -k 1 -at "enum" -en ($eggFlags) $i; - } - - } - else - { - addAttr -ln ($attrName + "2") -k 1 -at "enum" -en ($eggFlags) $i; - } - } - else - { - addAttr -ln ($attrName + "1") -k 1 -at "enum" -en ($eggFlags) $i; + + for ($i in $sel) { + string $attrName = "eggObjectTypes"; + string $object = ($i + "." + $attrName); + + int $num = 1; + + while (`objExists ($object + $num)`) { + $num++; } + + addAttr -ln ($attrName + $num) -k 1 -at "enum" -en ($eggFlags) $i; } } diff --git a/pandatool/src/mayaegg/mayaNodeTree.cxx b/pandatool/src/mayaegg/mayaNodeTree.cxx index f80a3c95c1..8b12dea910 100644 --- a/pandatool/src/mayaegg/mayaNodeTree.cxx +++ b/pandatool/src/mayaegg/mayaNodeTree.cxx @@ -32,6 +32,8 @@ #include #include "post_maya_include.h" +#include + using std::string; /** @@ -341,13 +343,21 @@ get_egg_group(MayaNodeDesc *node_desc) { MObject dag_object = node_desc->get_dag_path().node(); string object_type; LVector3d value; - if (get_enum_attribute(dag_object, "eggObjectTypes1", object_type)) { - egg_group->add_object_type(object_type); - } - if (get_enum_attribute(dag_object, "eggObjectTypes2", object_type)) { - egg_group->add_object_type(object_type); - } - if (get_enum_attribute(dag_object, "eggObjectTypes3", object_type)) { + + for (unsigned int i = 1; ; i++) { + std::ostringstream attr; + attr << "eggObjectTypes" << i; + + if (!get_enum_attribute(dag_object, attr.str(), object_type)) { + if (i < 3) { + // Support out-of-order legacy object types. + continue; + } + + // We have run out of object types to add. + break; + } + egg_group->add_object_type(object_type); }