stjohn stjohn

stjohn

About Me

Expertise
Not Specified
Location
Not Specified
Website

Connect

Recent Forum Posts

Stop me if you've heard this one before: 'module' object has no attribute 'foo' Aug. 5, 2016, 1:19 a.m.



I've got a bunch of defs in my HDA's python module, and one of them, regenTiles(), gets triggered by a button press callback.

Unless I allow edit, then open type properties and edit the PythonModule script in some way, then save the asset, regenTiles will always throw an AttributeError.

A long time ago, Rob Vinluan showed me a hackaround that put all the parms in a dictionary or something to wake them up, but I don't have access to that asset at my new workplace.

Is there a definite answer for why this happens and how to prevent it in the future? How do I make sure that my asset initializes with all of the functions in the Python Module callable by parameter callbacks?

Script editor block select bug Aug. 4, 2016, 4:03 p.m.

I'm not surprised, it's intermittent, which is always a bitch to track down. I don't know the exact conditions that make it happen on my end either.

Script editor block select bug Aug. 4, 2016, 3:35 p.m.

One of the most irritating experiences in the Asset workflow is the fact that the script editor in Type Properties/Scripts will seem to randomly scroll to somewhere else and select everything from where you want to be to where it put you. So not only do you wind up way off the fairway, you get a blinding flash of yellow light in your eyes for your trouble.

This is H15.5 on Windows 10, so it may not show up other OSs, especially Linux where window focus is actually done properly.

It might have to do with some instances of scrolling the script edit window without actually clicking in the window first. if you scroll around, then click in the window where you stopped, it will appear to scroll back to where your last selection was, then highlight from where your new selection is to that point. So something in there is not keeping track of text editor scroll position when focus is changing around.