Bug Report [Web] : Pattrstorage patcher name update bug?

Feb 2, 2006 at 12:05am

Bug Report [Web] : Pattrstorage patcher name update bug?

userEmail ::
——————
lists@lowfrequency.org

bugHeader ::
——————
Pattrstorage patcher name update bug?

bugSummary ::
——————
Pattrstorage’s [storagewindow] and [clientwindow] commands show a list of the attached pattr objects, grouped by the subpatches they reside in (1 level down). When you rename those subpatches in the max patch, the patcher names in the pattrstorage client and storage windows do not update.

bugStepsReproduce ::
——————
Take the included patch – see that the names listed in the pattrstorage client/storage windows do not match the subpatcher names (p coloring, p subpatch01, p render-params). Change the subpatcher names and note that pattrstorage does not update these names in the client/storage window. Also, select the pattrstorage object and subpatches, copy them, and paste them into a new patch – the incorrect names still won’t change.

bugExpectedResults ::
——————
I expected the names listed in the client/storage window to update when I change the names of subpatchers containing pattr objects linked to a pattrstorage object.

bugActualResults ::
——————
The names do not even update.

bugRegression ::
——————
None.

bugNotes ::
——————
Example patch:

max v2;
#N vpatcher 355 77 955 477;
#P window setfont “Sans Serif” 9.;
#P number 180 125 35 9 1 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 3;
#P hidden newex 38 245 129 196617 pattrstorage params @savemode 1 @changemode 1;
#X client_rect 10 59 650 299;
#X storage_rect 10 59 650 299;
#P objectname params;
#P window linecount 1;
#N vpatcher 598 310 1219 743;
#P origin 0 -31;
#P window setfont “Sans Serif” 9.;
#P flonum 310 125 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 445 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 535 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 0;
#P newex 534 174 34 196617 / 16.;
#P newex 445 172 34 196617 / 16.;
#P user multiSlider 353 45 13 98 -15. 15. 1 2681 47 1 0 1 0 0 1;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P newex 328 169 58 196617 speedlim 5;
#P newex 445 194 50 196617 pack 0. 0.;
#P toggle 336 246 15 0;
#P user pictslider 445 69 100 100 4 4 4 4 SliderDefaultKnob.pct 1 SliderDefaultBkgnd.pct 1 2163 0 16842496 -16776960 1. 1.;
#P newex 328 219 109 196617 prepend light_position;
#P newex 353 245 29 196617 gate;
#P message 352 285 222 196617 light_position 0.1 0. 0.625 -2.9375;
#P newex 353 265 62 196617 prepend set;
#P newex 328 194 84 196617 pattr lightpos;
#X prestore 4 0 0.1 0. 0.625 -2.9375;
#P objectname lightpos;
#P flonum 354 27 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 328 147 85 196617 pak 0.05 0. 0. 0.;
#P number 147 45 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 237 45 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 236 169 34 196617 / 16.;
#P newex 147 167 34 196617 / 16.;
#P user multiSlider 8 62 14 98 -15. 15. 1 2681 47 1 0 1 0 0 1;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P newex 30 164 58 196617 speedlim 5;
#P newex 147 189 50 196617 pack 0. 0.;
#P toggle 40 241 15 0;
#P user pictslider 147 64 100 100 4 4 4 4 SliderDefaultKnob.pct 1 SliderDefaultBkgnd.pct 1 2163 0 16842496 -16776960 1. 1.;
#P newex 30 214 81 196617 prepend camera;
#P newex 57 240 29 196617 gate;
#P window linecount 1;
#P message 57 280 198 196617 camera 0. 0. -2.375;
#P newex 57 260 62 196617 prepend set;
#P window linecount 0;
#P newex 30 189 84 196617 pattr camerapos;
#X prestore 3 0 0. 0. -2.375;
#P objectname camerapos;
#P flonum 31 63 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 30 142 73 196617 pak 0. 0. 0.;
#P newex 30 322 68 196617 s toRenderer;
#P connect 2 0 12 0;
#P connect 12 0 1 0;
#P connect 1 0 11 0;
#P connect 11 0 3 0;
#P connect 3 0 7 0;
#P fasten 23 0 0 0 333 305 35 305;
#P connect 7 0 0 0;
#P connect 9 0 6 0;
#P connect 6 0 4 0;
#P connect 4 0 5 0;
#P connect 10 0 1 1;
#P connect 7 0 6 1;
#P connect 16 0 8 0;
#P connect 8 0 13 0;
#P connect 13 0 10 0;
#P connect 14 0 10 1;
#P connect 8 1 14 0;
#P connect 15 0 8 1;
#P fasten 33 0 17 0 315 143 333 143;
#P connect 17 0 27 0;
#P connect 27 0 19 0;
#P connect 19 0 23 0;
#P connect 20 0 21 0;
#P connect 18 0 28 0;
#P connect 28 0 17 1;
#P connect 25 0 22 0;
#P connect 22 0 20 0;
#P connect 23 0 22 1;
#P fasten 26 0 17 2 450 214 428 214 428 139 383 139;
#P connect 32 0 24 0;
#P connect 24 0 29 0;
#P connect 29 0 26 0;
#P connect 30 0 26 1;
#P connect 24 1 30 0;
#P connect 31 0 24 1;
#P pop;
#P newobj 291 160 86 196617 p render-params;
#P objectname render-params;
#N vpatcher 666 355 1054 690;
#P window setfont “Sans Serif” 9.;
#P newex 71 279 71 196617 prepend color;
#P newex 71 255 58 196617 speedlim 5;
#P hidden newex 246 39 82 196617 pattr cloudalpha;
#X prestore 1 0 0;
#P objectname cloudalpha;
#P newex 85 196 68 196617 t b f;
#P hidden newex 245 149 40 196617 / 128.;
#P user uslider 245 75 13 53 256 1 0 0;
#P objectname uslider;
#P newex 71 303 56 196617 s toClouds;
#P window linecount 1;
#P hidden newex 70 49 82 196617 pattr cloudcolor;
#X prestore 3 0 220 149 86;
#P objectname cloudcolor;
#P comment 69 148 47 196617 GL color;
#P hidden message 159 50 69 196617 saturation $1;
#P user uslider 57 75 13 53 256 1 0 0;
#P user swatch 70 75 175 69;
#P hidden newex 71 165 103 196617 vexpr $i1 / 255.;
#P newex 71 224 84 196617 pack 1. 1. 1. 0.1;
#P window linecount 0;
#P comment 245 60 33 196617 alpha;
#P hidden fasten 3 0 7 0 75 150 51 150 51 43 75 43;
#P hidden fasten 5 0 3 0 164 69 75 69;
#P hidden connect 7 0 3 0;
#P hidden connect 3 0 2 0;
#P connect 2 0 1 0;
#P connect 11 0 1 0;
#P connect 1 0 13 0;
#P connect 13 0 14 0;
#P connect 14 0 8 0;
#P fasten 10 0 11 0 250 188 90 188;
#P connect 11 1 1 3;
#P hidden fasten 4 0 5 0 62 150 51 150 51 43 164 43;
#P hidden connect 12 1 9 0;
#P hidden connect 9 0 10 0;
#P pop;
#P newobj 291 135 82 196617 p subpatch01;
#P objectname moon-coloring;
#N vpatcher 526 105 1270 582;
#P origin 0 1;
#P window setfont “Sans Serif” 9.;
#P flonum 246 395 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname flonum[1];
#P newex 296 395 76 196617 pattr light_val;
#X prestore 1 0 0.;
#P objectname light_val;
#P window linecount 1;
#P hidden newex 244 208 35 196617 s toIo;
#P hidden newex 79 419 68 196617 s toRenderer;
#P flonum 597 89 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname flonum;
#P window setfont “Sans Serif” 24.;
#P comment 53 239 145 196632 Lighting;
#P window setfont “Sans Serif” 9.;
#P hidden newex 394 251 50 196617 pattr ls;
#X prestore 3 0 255 255 255;
#P objectname ls;
#P hidden newex 233 251 50 196617 pattr ld;
#X prestore 3 0 143 143 143;
#P objectname ld;
#P hidden newex 68 251 50 196617 pattr la;
#X prestore 3 0 45 45 45;
#P objectname la;
#P comment 403 333 47 196617 Specular;
#P comment 241 333 47 196617 Diffuse;
#P hidden message 465 251 69 196617 saturation $1;
#P user uslider 381 277 13 53 256 1 0 0;
#P hidden message 304 251 69 196617 saturation $1;
#P user uslider 220 278 13 53 256 1 0 0;
#P newex 79 394 161 196617 pak light_ambient 0.5 0.5 0.5 0.1;
#P user swatch 394 277 123 54;
#P hidden newex 409 347 103 196617 vexpr $i1 / 255.;
#P hidden newex 409 368 128 196617 prepend light_specular;
#P user swatch 68 278 123 54;
#P hidden newex 79 347 103 196617 vexpr $i1 / 255.;
#P hidden newex 79 368 122 196617 prepend light_ambient;
#P user swatch 233 278 123 54;
#P hidden newex 247 347 103 196617 vexpr $i1 / 255.;
#P hidden newex 247 368 122 196617 prepend light_diffuse;
#P hidden message 122 251 69 196617 saturation $1;
#P user uslider 55 278 13 53 256 1 0 0;
#P comment 79 333 47 196617 Ambient;
#P comment 398 147 47 196617 Specular;
#P comment 236 147 47 196617 Diffuse;
#P hidden message 460 66 69 196617 saturation $1;
#P user uslider 376 91 13 53 256 1 0 0;
#P hidden message 299 66 69 196617 saturation $1;
#P user uslider 215 92 13 53 256 1 0 0;
#P newex 546 67 112 196617 pattr shine shiny;
#X prestore 1 0 7.;
#P objectname shine;
#P hidden newex 389 66 50 196617 pattr ms;
#X prestore 3 0 255 255 255;
#P objectname ms;
#P hidden newex 228 66 50 196617 pattr md;
#X prestore 3 0 20 20 20;
#P objectname md;
#P hidden newex 63 66 50 196617 pattr ma;
#X prestore 3 0 153 153 153;
#P objectname ma;
#P hidden newex 74 208 161 196617 pak mat_ambient 0.5 0.5 0.5 1.;
#P newex 597 112 110 196617 prepend shininess;
#P user swatch 389 91 123 54;
#P hidden newex 404 161 103 196617 vexpr $i1 / 255.;
#P hidden newex 404 182 128 196617 prepend mat_specular;
#P user swatch 63 92 123 54;
#P hidden newex 74 161 103 196617 vexpr $i1 / 255.;
#P hidden newex 74 182 122 196617 prepend mat_ambient;
#P user swatch 228 92 123 54;
#P hidden newex 242 161 103 196617 vexpr $i1 / 255.;
#P hidden newex 242 182 122 196617 prepend mat_diffuse;
#P hidden message 117 66 69 196617 saturation $1;
#P user uslider 50 92 13 53 256 1 0 0;
#P window linecount 0;
#P comment 74 147 47 196617 Ambient;
#P window setfont “Sans Serif” 24.;
#P comment 48 41 145 196632 Material;
#P hidden fasten 9 0 15 0 68 167 44 167 44 59 68 59;
#P hidden fasten 3 0 9 0 122 86 68 86;
#P hidden connect 15 0 9 0;
#P hidden fasten 33 0 44 0 73 353 50 353 50 245 73 245;
#P hidden fasten 27 0 33 0 127 272 73 272;
#P hidden connect 44 0 33 0;
#P hidden connect 9 0 8 0;
#P hidden connect 8 0 7 0;
#P hidden fasten 13 0 14 0 602 202 79 202;
#P hidden fasten 10 0 14 0 409 202 79 202;
#P hidden fasten 4 0 14 0 247 202 79 202;
#P hidden connect 7 0 14 0;
#P hidden connect 33 0 32 0;
#P hidden connect 32 0 31 0;
#P hidden connect 31 0 37 0;
#P hidden fasten 28 0 37 0 252 388 84 388;
#P hidden fasten 34 0 37 0 414 388 84 388;
#P connect 37 0 49 0;
#P hidden fasten 2 0 3 0 55 167 45 167 45 59 122 59;
#P hidden fasten 26 0 27 0 60 353 50 353 50 245 127 245;
#P fasten 52 0 37 4 251 413 242 413 242 390 232 390;
#P hidden fasten 6 0 16 0 233 167 209 167 209 60 233 60;
#P hidden connect 16 0 6 0;
#P hidden fasten 20 0 6 0 304 86 233 86;
#P hidden fasten 30 0 45 0 238 353 214 353 214 246 238 246;
#P hidden fasten 39 0 30 0 309 272 238 272;
#P hidden connect 45 0 30 0;
#P hidden connect 6 0 5 0;
#P hidden connect 5 0 4 0;
#P hidden fasten 14 0 50 0 79 228 240 228 240 206 249 206;
#P fasten 51 1 52 0 334 417 288 417 288 392 251 392;
#P hidden connect 30 0 29 0;
#P hidden connect 29 0 28 0;
#P hidden fasten 19 0 20 0 220 167 209 167 209 60 304 60;
#P hidden fasten 38 0 39 0 225 353 214 353 214 246 309 246;
#P hidden fasten 12 0 17 0 394 166 370 166 370 59 394 59;
#P hidden connect 17 0 12 0;
#P hidden fasten 22 0 12 0 465 85 394 85;
#P hidden fasten 36 0 46 0 399 352 375 352 375 245 399 245;
#P hidden fasten 41 0 36 0 470 271 399 271;
#P hidden connect 46 0 36 0;
#P hidden connect 12 0 11 0;
#P hidden connect 11 0 10 0;
#P hidden connect 36 0 35 0;
#P hidden connect 35 0 34 0;
#P hidden fasten 21 0 22 0 381 166 370 166 370 59 465 59;
#P hidden fasten 40 0 41 0 386 352 375 352 375 245 470 245;
#P connect 18 1 48 0;
#P connect 48 0 13 0;
#P pop;
#P newobj 291 110 83 196617 p coloring;
#P objectname material-coloring;
#P newex 110 46 60 196617 loadmess 1;
#P toggle 110 68 34 0;
#N vpatcher 696 287 1287 768;
#P inlet 216 38 15 0;
#P window setfont “Sans Serif” 9.;
#P newex 255 337 50 196617 deferlow;
#P newex 53 67 30 196617 < 25;
#P newex 53 44 64 196617 r framerate;
#P outlet 186 421 15 0;
#P comment 98 71 128 196617 < -- high/low-speed toggle;
#P inlet 34 44 15 0;
#P message 276 261 134 196617 5. , 6. 800 7. 800 8. 800;
#P newex 134 270 39 196617 r sync;
#P message 245 233 163 196617 14. , 15. 2400 16. 240 17. 2400;
#P message 305 287 74 196617 18. , 19. 300;
#P newex 53 89 23 196617 + 1;
#P newex 53 115 81 196617 gate 2 1;
#P message 125 189 85 196617 2. 2400 1. 2400;
#P message 283 287 14 196617 1;
#P button 34 90 15 0;
#P newex 34 206 21 196617 t 1;
#P newex 202 338 21 196617 t 0;
#P newex 226 367 50 196617 change 1.;
#P toggle 186 375 15 0;
#P newex 186 394 29 196617 gate;
#P newex 65 204 56 196617 r RECsync;
#P newex 226 315 50 196617 bline 1.;
#P message 124 142 85 196617 2. 2400 1. 2400;
#P connect 17 0 8 0;
#P connect 8 0 7 0;
#P connect 20 0 21 0;
#P connect 21 0 12 0;
#P connect 12 0 11 0;
#P fasten 8 0 11 1 39 110 129 110;
#P connect 11 1 0 0;
#P connect 11 0 10 0;
#P connect 22 0 10 0;
#P fasten 7 0 4 0 39 359 191 359;
#P fasten 6 0 4 0 207 359 191 359;
#P connect 23 0 4 0;
#P connect 4 0 3 0;
#P connect 3 0 19 0;
#P fasten 5 0 3 1 231 389 210 389;
#P fasten 2 0 1 0 70 231 231 231;
#P connect 9 0 1 0;
#P connect 13 0 1 0;
#P connect 14 0 1 0;
#P connect 16 0 1 0;
#P fasten 0 0 1 0 129 184 231 184;
#P fasten 10 0 1 0 130 220 231 220;
#P fasten 15 0 1 0 139 295 231 295;
#P connect 1 0 5 0;
#P connect 1 1 22 0;
#P pop;
#P newobj 37 108 83 196617 p preset-control;
#P outlet 12 172 15 0;
#P message 200 172 30 196617 read;
#P message 180 147 50 196617 insert $1;
#P message 119 172 69 196617 clientwindow;
#P message 38 172 78 196617 storagewindow;
#P message 39 193 114 196617 write params.xml;
#P comment 37 132 34 196617 recall;
#P number 77 147 35 9 1 0 65 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 37 147 35 9 1. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P hidden message 77 216 50 196617 store $1;
#P inlet 37 86 15 0;
#P comment 77 132 34 196617 store;
#P fasten 3 0 11 0 42 167 17 167;
#P connect 1 0 12 0;
#P connect 12 0 3 0;
#P hidden connect 7 0 18 0;
#P hidden connect 8 0 18 0;
#P hidden connect 6 0 18 0;
#P hidden connect 2 0 18 0;
#P hidden connect 10 0 18 0;
#P hidden connect 9 0 18 0;
#P hidden connect 3 0 18 0;
#P hidden connect 4 0 2 0;
#P connect 14 0 13 0;
#P connect 13 0 12 1;
#P connect 19 0 9 0;
#P pop;

#24226
Feb 4, 2006 at 11:53am

If you change the >>patcher name< < of the subpatcher (e.g. Object-
>Name…), the name properly updates. However, there is no law that
says that the argument or typed-in name of a subpatcher, patcher,
poly~ or bpatcher has to be the same as the patchername, especially
if the developer explicitly changes it, like you are (I think) doing
here.

The first time a pattr object is created in a subpatcher, it “bubbles
up” through the patcher hierarchy, naming any patchers along the way
*if they don’t already have names*. If they do, they are left alone.
This will likely never change, so you just need to be vigilant when
retyping boxes, that you rename them, too.

jb

#69755
Feb 7, 2006 at 12:00am

On Feb 4, 2006, at 6:53 AM, Jeremy Bernstein wrote:

> However, there is no law that says that the argument or typed-in name
> of a subpatcher, patcher, poly~ or bpatcher has to be the same as the
> patchername, especially if the developer explicitly changes it, like
> you are (I think) doing here.
>

Interesting – I have to say that I never realized that the patcher name
and it’s 1st argument were different.

Why isn’t there such a law? It’s the only way that makes sense, to me.
Or is there something that I’m missing about the proper use of
subpatchers? I was under the impression that typeing [p NAME] was a way
to organize your patch. So I have to explicitly re-name my subpatchers
with the name message every time I change their 1st argument? I’m a
little confused.

-evan

#69756
Feb 7, 2006 at 12:48am

You’re not missing anything. It just doesn’t work like you think it
ought to, which is something that reasonable people can disagree
about. It was decided that explicit developer intentions (giving a
name, or keeping a name that has been auto-awarded) trumped automatic
behavior of objects behind the scenes. If you explicitly change the
argument to a subpatcher, you will need to explicitly change its
patcher name, too.

jb

#69757
Feb 7, 2006 at 3:44am

I see – thanks for the explanation.

I can see why it is the way it is, but I can’t say that I find it
intuitive. FWIW, I vote for a change in this behavior, just for
subpatcher objects, so that changing the argument also changes the
name. But that’s just my 2 cents. The only time its noticeable is
with pattrstorage, as far as I’ve seen, but knowing that i have to
explicitly name patchers solves my problem!

best,
evan

#69758
Feb 14, 2006 at 11:03pm

Actually, there still is a slight problem.
When I change the name of the subpatchers, it deletes all of the stored
presets for the pattrs inside them. Is there a way to make it so that
pattrstorage can keep the preset data when the patcher name changes?

#69759
Feb 14, 2006 at 11:24pm

Not at this time. You can likely edit the XML file directly to deal
with this, though.

jb

#69760
Feb 15, 2006 at 4:25pm

ah, ok. i figured it might be a tricky code fix. it’s not hard to
find/replace in the XML file, though, which is good.

thanks,
evan

#69761

You must be logged in to reply to this topic.